c#语言定义一个整型变量a,分别把这个整型变量转换成字符串型变量b,浮点型变量c并输出

2024-11-20 20:17:51
推荐回答(2个)
回答1:

int aa = 123;
string bb = aa.ToString();
double cc = ((float)aa) - 0.1;
Console.WriteLine(cc);
Console.WriteLine(bb);

回答2:

int a = 1;
String b =a.toString();
double c = (double)a
输出 abc