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“极度肥胖”;}}输入分别是55.0和1.62


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“极度肥胖”;}}输入分别是55.0和1.62,返回结果是()。

正确答案:正常


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