using System;
namespace ConsoleApp1
{
internal class Program
{
static void Main(string[] args)
{
double x = 10 / 3;
double y = 3.0000;
Console.WriteLine("x={0}.y={1}",x,y);
}
}
}
输出结果是x=3,y=3,可是为什么呢?不应该是x=3.0,y=3.0吗?