2 solutions

  • 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
      537
      Accepted
      216
      Uploaded By