P5714拿80分,求助!
查看原帖
P5714拿80分,求助!
1352368
TheManLeondaVinci楼主2024/5/4 20:08
#include<iostream>
#include<iomanip>
using namespace std;
int main(){
    double m,h;
    cin>>m>>h;
    double BMI=m/(h*h);
    if(BMI<18.5){
        cout<<"UnderWeight";
    }else if(BMI>=18.5&&BMI<24){
        cout<<"Normal";
    }else{
        cout<<setprecision(6)<<BMI<<'\n'<<"Overweight";
    }
    return 0;
}

实在没有思路了,哪位大佬能帮忙解决#3测试点WA的问题,万分感谢! (上次提问有位大佬指出我问问题的方法有问题,这次已经改进)

2024/5/4 20:08
加载中...