'commit'
This commit is contained in:
14
TangDou/XiTi/1225.cpp
Normal file
14
TangDou/XiTi/1225.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
float height, weight;
|
||||
cin >> height >> weight;
|
||||
|
||||
float BMI = weight / (height * height); //注意这个扩号
|
||||
if (BMI < 18.5) cout << "thin" << endl;
|
||||
if (BMI >= 18.5 && BMI < 24) cout << "normal" << endl;
|
||||
if (BMI >= 24) cout << "fat" << endl;
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user