#include<stdio.h>
main()
{
float w,h,t;
printf("Please input weight(kg):");
scanf("%f",&w);
printf("\nPlease input height(m):");
scanf("%f",&h);
printf("\n");
t=w/h/h;
if(t<18)
printf("偏瘦");
else if(t>=18 && t<25)
printf("正常体重");
else if(t>=25 && t<27)
printf("超重");
else
printf("肥胖");
printf("\n");
}
评论0