3 solutions

  • 0
    @ 2024-10-23 15:09:05

    #include<stdio.h> int main() { float x, y; scanf_s("%f %f",&x,&y); float BMI; BMI = y / (x * x); if (BMI < 18.5) { printf("low"); } else if (BMI < 24 & BMI >= 18.5) { printf("average"); } else if (BMI >= 24) { printf("high"); }; return 0;

    }

    • 0
      @ 2022-4-5 1:26:29

      水题

      #include <iostream>
      using namespace std;
      int main()
      {
          double h,w;
          cin >> h >> w;
          double bmi = w/h/h;
          if(bmi >= 24)   cout << "high" << endl;
          else if(bmi >= 18.5) cout << "normal" << endl;
          else cout << "low" << endl;
          return 0;
      }
      
      • 0
        @ 2022-3-7 22:07:19
        #include <stdio.h>
        #include <algorithm>
        #include <math.h>
        using namespace std;
        double m,w;
        int main() {
            scanf("%lf%lf",&m,&w);
            double ans=w/(m*m);
            if(ans<18.5)
                printf("low\n");
            else
                if(ans<24)
                printf("normal\n");
            else
            if(ans>=24)
                printf("high\n");
            return 0;
        }
        
        
        • 1

        Information

        ID
        88
        Time
        1000ms
        Memory
        256MiB
        Difficulty
        5
        Tags
        # Submissions
        694
        Accepted
        264
        Uploaded By