13 条题解

  • 5
    @ 2023-10-22 17:31:50

    #include

    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;

    }

    • 1
      @ 2024-2-23 9:30:46

      #include<bits/stdc++.h> using namespace std; int main(){ double m,h,n; cin>>m>>h; n=m/h/h; if(n<18.5){ cout<<"Underweight"; } if(n>=18.5 and n<24){ cout<<"Normal"; } if(n>=24){ cout<<n<<endl; cout<<"Overweight"; } return 0 ; }

      • 1
        @ 2023-12-8 18:01:38

        #include

        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;

        }

        • 0
          @ 2024-10-15 22:00:10
          #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;
          }
          • 0
            @ 2024-5-15 18:25:46

            #include<bits/stdc++.h> using namespace std; int main(){ double m,h,c; cin>>m>>h; c=m/(h*h); if(c<18.5)cout<<"Underweight"; if(c>=18.5 && c<24)cout<<"Normal"; if(c>=24)cout<<c<<endl<<"Overweight"; return 0; }

            • 0
              @ 2023-12-8 18:01:29

              #include

              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;

              }

              • -1
                @ 2025-3-14 17:21:35

                #include<bits/stdc++.h> using namespace std; int main(){ double m,h; cin>>m>>h; double BMI=m/(h*h); if(BMI<18.5){ cout<<"Underweight"; } if(BMI>=18.5 and BMI<24){ cout<<"Normal"; }if(BMI>=24){ cout<<BMI<<endl<<"Overweight"; } return 0; }

                • -1
                  @ 2025-3-14 17:21:32

                  #include<bits/stdc++.h> using namespace std; int main(){ double m,h; cin>>m>>h; double BMI=m/(h*h); if(BMI<18.5){ cout<<"Underweight"; } if(BMI>=18.5 and BMI<24){ cout<<"Normal"; }if(BMI>=24){ cout<<BMI<<endl<<"Overweight"; } return 0; }

                  • -1
                    @ 2025-3-9 11:31:13

                    #include<bits/stdc++.h> using namespace std; int main(){ double m,h,bmi; cin>>m>>h; bmi=m/(h*h); if(bmi<18.5)cout<<"Underweight"; if(bmi>=18.5 and bmi>24)cout<<"Norml"; if(bmi>=24){ cout<<bmi<<endl; cout<<"Overweight"; } return 0; }

                    • -1
                      @ 2025-2-15 11:45:01

                      #include<bits/stdc++.h> using namespace std; int main(){ int a; cin>>a; if(a<=150){ printf("%.1lf",a0.4463); }else if(a<=400){ printf("%.1lf",1500.4463+(a-150)0.4663); }else{ printf("%.1lf",1500.4463+(400-150)*0.4663+(a-400)*0.5663); } return 0; }

                      • -1
                        @ 2024-11-16 15:42:03

                        #include

                        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; }

                        • -1
                          @ 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;
                          
                          }
                          
                          • -1
                            @ 2024-3-3 8:34:38

                            #include

                            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;

                            }

                            • 1

                            信息

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