标签:bim clu 计算器 scanf inpu turn can float c语言
#include<stdio.h>
int main() {
float BMI;
float weight;
float height;
float bmi;
printf("pleaae input the weight:");
scanf("%f", &weight);
printf("please input the height:");
scanf("%f", &height);
bmi= weight / (height * height);
printf("your BIM is %f",bmi);
if(bmi<18.5)printf("偏轻");
if(bmi>18.5&&bmi<24.9)printf("正常") ;
if(bmi>25&&bmi<29.9)printf("偏重") ;
if(bmi>30)printf("超重") ;
return 0;
}
标签:bim clu 计算器 scanf inpu turn can float c语言
原文地址:https://www.cnblogs.com/1728067596wc/p/11312632.html