c#计算结果保留一位小数点result = (weight - Bbiaow) * 100 / Bbiaow;Console.WriteLine("{0:F1}",result);该怎么改case'N“:Bbiaow = (shenh - 100) * 0.9;Console.WriteLine(Bbiaow.ToString("0.0"));result = (weight - Bbiaow) * 100 / Bbiaow;C
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/16 01:29:10
c#计算结果保留一位小数点result = (weight - Bbiaow) * 100 / Bbiaow;Console.WriteLine("{0:F1}",result);该怎么改case'N“:Bbiaow = (shenh - 100) * 0.9;Console.WriteLine(Bbiaow.ToString("0.0"));result = (weight - Bbiaow) * 100 / Bbiaow;C
c#计算结果保留一位小数点
result = (weight - Bbiaow) * 100 / Bbiaow;
Console.WriteLine("{0:F1}",result);
该怎么改
case'N“:
Bbiaow = (shenh - 100) * 0.9;
Console.WriteLine(Bbiaow.ToString("0.0"));
result = (weight - Bbiaow) * 100 / Bbiaow;
Console.WriteLine("0.0");
label7.Text += "您的标准体重应为" + Bbiaow + "kg,"
+ "实际比率为" + result + "%"+"\n";
break;
c#计算结果保留一位小数点result = (weight - Bbiaow) * 100 / Bbiaow;Console.WriteLine("{0:F1}",result);该怎么改case'N“:Bbiaow = (shenh - 100) * 0.9;Console.WriteLine(Bbiaow.ToString("0.0"));result = (weight - Bbiaow) * 100 / Bbiaow;C
double result = (30 - 19) * 10 / 3.0;
Console.WriteLine(result.ToString("0.0"));
double result = (30 - 19) * 100 / 3.0;
Console.WriteLine(Math.Round(result,1));