uble d = 2.5;
int x = int(d)+1;
Console.WriteLine(x);
始终运行通不过!
要用英文括号
double d = 2.5;
int x = (int)d + 1;
double d =2.5;
int x = (int)d+1;
Console.Wrte(x);
第一行“d”的数据类型写错了,改成 double d = 2.5; 就行了
是double吧..?