zl程序教程

您现在的位置是:首页 >  其他

当前栏目

关于类型转换

2023-03-14 10:22:25 时间

强制类型转换:

int cs, bcs;
double result;
bcs =<strong><span style="font-size:18px;"> </span><span style="font-size:12px;">Convert.ToInt32</span>(</strong>Console.ReadLine()<strong>)</strong>;
cs = <strong>int.Parse(</strong>Console.ReadLine()<strong>)</strong>;
result = bcs / cs; 
Console.WriteLine(result);