hr1213

导航

计算BMI指数

#include<stdio.h>
#include<windows.h>
int main()
{
double height;
double weight;
double BMI;
printf("请输入您的身高(m) 您的体重(kg)");
scanf("%lf %lf",&height,&weight);
BMI = weight/pow(height,2);
printf("您的BMI指数为 %lf",BMI);
system("pause");
return 0;
}

posted on 2022-10-15 19:42  HLR1213  阅读(18)  评论(0)    收藏  举报