c++

wch123 发表于 1年前 · 关联问题 体型判断

include

include <math.h>

using namespace std;

int main() {

double a,b,c; cin>>a>>b; c=b/(a*a); if(c<18){ cout<<"underweight"; }else if(c<25){ cout<<"normal"; }else if(c<27){ cout<<"overweight"; }else { cout<<"obese"; } }