题解 | #计算商品打折结算金额#
判断身材状态
http://www.nowcoder.com/practice/6f4afb0f8be64d5eaf65a205b8584888
#include using namespace std;
int main() {
double weight;
double height;
cin >> weight;
cin >> height;
double c=0;
c=weight/(height*height);//体重/身高平方
// write your code here......
if(c<18.5)
printf("偏瘦");
else if(c>=18.5&&c<20.9)
printf("苗条");
else if(c>=20.9&&c<=24.9)
printf("适中");
else
printf("偏胖");
return 0;
}