BMI指数题解
2023-08-05 17:28:01
发布于:上海
#include<bits/stdc++.h>
using namespace std;
int main(){
float m,h;
cin>>m>>h;
float BMI=m/h/h;
if(BMI<18.5) cout<<"Underweight";
else if(BMI>=18.5 and BMI<24) cout<<"Normal";
else cout<<fixed<<setprecision(2)<<BMI<<endl<<"Overweight";
return 0;
}
这里空空如也
有帮助,赞一个