80分,第三个wa了;大佬们帮忙看看
查看原帖
80分,第三个wa了;大佬们帮忙看看
1595968
wangchunyuIO楼主2024/12/29 18:01
#include<bits/stdc++.h>
using namespace std;
double m,h;
float BMI;
int main(){
    cin>>m>>h;
    BMI=m/(h*h);
    if(BMI<18.5){
        cout<<"Underweight"<<endl;
    }
    if(BMI>=18.5&&BMI<24){
        cout<<"Normal"<<endl;
    }else{
        cout<<setprecision(4)<<fixed<<BMI<<endl<<"Overweight"<<endl;
    }
    return 0;
}
2024/12/29 18:01
加载中...