提交时间:2020-08-22 13:39:55

运行 ID: 6058

#include <iostream> #include <cstdio> using namespace std; int main() { int m; double h,s; cin >> m >> h; s = m * 1.0 / (h * h); if(s < 18.5) { cout << "Underweight" <<endl; } if(s >= 18.5 && s < 24) { cout << "Normal" <<endl; } if(s >= 24) { cout << s <<endl; cout << "Overweight" <<endl; } return 0; }