【shenh】...result);该怎么改case'N“:Bbiaow=(shenh-100)*0.9;Console...

发布时间:2021-03-21 19:02:03

【shenh】...result);该怎么改case'N“:Bbiaow=(shenh-100)*0.9;Console...

网友回答

【答案】 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)); 追问: 我两种方法都试了,还是不行 追答: 代码发过来看看,你定义的类型是什么 追问: double shenh, weight, Gbiaow, Bbiaow, result;
   shenh = Convert.ToInt32(textBox2.Text);
   weight = Convert.ToInt32(textBox3.Text);
   result = 0; 追答: 两个整型数据相除是整型,你自己注意看看类型,,有可能这里有问题。。你用
  
  double.Parse(textBox2.text)试试,别转整数。。
以上问题属网友观点,不代表本站立场,仅供参考!