7 条题解

  • 0
    @ 2024-3-24 10:18:18
    #include<iostream>
    
    using namespace std;
    
    int main(){
    
    float m,h,a;
    
    cin>>m>>h;
    
    a=m/(h*h);
    
    if (a<18.5) cout<<"Underweight";
    
    if (a>=18.5 and a<24) cout<<"Normal";
    
    else {
    
    if (a>=24){
    
    cout<<a<<endl;
    
    cout<<"Overweight";
    
    }
    
    }
    
    return 0;
    
    }
    

    信息

    ID
    621
    时间
    1000ms
    内存
    125MiB
    难度
    5
    标签
    (无)
    递交数
    505
    已通过
    190
    上传者