publicclassBMI{publicStringtoString(doubleweight,doubleheight){doubleb=weight/(height*height);if(b<20)return“偏瘦”;elseif(b<25)return“正常”;elseif(b<30)return“偏胖”;elseif(b<35)return“肥胖”;elseif(b<40)return“重度肥胖”;elsereturn“极度肥胖”;}}输入75.0,1.70,返回


publicclassBMI{publicStringtoString(doubleweight,doubleheight){doubleb=weight/(height*height);if(b<20)return“偏瘦”;elseif(b<25)return“正常”;elseif(b<30)return“偏胖”;elseif(b<35)return“肥胖”;elseif(b<40)return“重度肥胖”;elsereturn“极度肥胖”;}}输入75.0,1.70,返回结果是()。

正确答案:偏胖


Tag:软件构造 中国大学MOOC软件构造 时间:2021-12-13 15:14:44