#include<bits/stdc++.h>
using namespace std;
int main()
{
double w,h;
cin>>w>>h;
double H=h/=100;
double BMI=w/(H*H);
if(BMI<18.5)
cout<<"thin"<<endl;
else if(18.5<=BMI && BMI<24)
cout<<"fit"<<endl;
else if(24<=BMI && BMI<28)
cout<<"over"<<endl;
else if(BMI>=28)
cout<<"fat"<<endl;
return 0;
}
体重评测代码(C++11)
最新推荐文章于 2024-05-28 15:43:55 发布