提交时间:2020-08-22 10:24:04
运行 ID: 6006
#include <iostream> #include <cstdio> using namespace std; int main() { double h , m , weight = 0; cin >> m >> h; weight = m / (h*h); if(weight < 18.5) { cout << "Underweight" << endl; } else if(weight >= 18.5 && weight < 24) { cout << "Normal" << endl; } else if(weight >= 24) { cout << weight << endl; cout << "Overweight" << endl; } return 0; }