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/07/03 22:36:04
![c#计算结果保留一位小数点result = (weight - Bbiaow) * 100 / Bbiaow;Console.WriteLine(](/uploads/image/z/4338401-41-1.jpg?t=c%23%E8%AE%A1%E7%AE%97%E7%BB%93%E6%9E%9C%E4%BF%9D%E7%95%99%E4%B8%80%E4%BD%8D%E5%B0%8F%E6%95%B0%E7%82%B9result+%3D+%28weight+-+Bbiaow%29+%2A+100+%2F+Bbiaow%3BConsole.WriteLine%28%22%7B0%3AF1%7D%22%2Cresult%29%3B%E8%AF%A5%E6%80%8E%E4%B9%88%E6%94%B9case%27N%E2%80%9C%EF%BC%9ABbiaow+%3D+%28shenh+-+100%29+%2A+0.9%3BConsole.WriteLine%28Bbiaow.ToString%28%220.0%22%29%29%3Bresult+%3D+%28weight+-+Bbiaow%29+%2A+100+%2F+Bbiaow%3BC)
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));