主题:菜鸟求救!!
刚开始学C#,请高手们解释下下面程序,好吗?
using System;
class MyLearn
{
public static void Main()
{
int ix;
float w=9.999f;
float x=3.4f;
float y=3.5f;
float z=3.6f;
ix=(int)w;
Console.WriteLine(ix+" ");
Console.WriteLine(Math.Round(x)+" ");//这是什么意思不明白
Console.WriteLine(Math.Round(y)+" ");
Console.WriteLine(Math.Round(z));
}
}
using System;
class MyLearn
{
public static void Main()
{
int ix;
float w=9.999f;
float x=3.4f;
float y=3.5f;
float z=3.6f;
ix=(int)w;
Console.WriteLine(ix+" ");
Console.WriteLine(Math.Round(x)+" ");//这是什么意思不明白
Console.WriteLine(Math.Round(y)+" ");
Console.WriteLine(Math.Round(z));
}
}