3 solutions

  • 1
    @ 2026-1-17 9:47:33

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

    return 0;
    

    }

    • -3
      @ 2025-10-19 16:02:20
      #include<bits/stdc++.h>
      using namespace std;
      int main()
      {
      	double n,m;
      	cin>>n>>m;
      	double a=n/(m*m);
      	if(a<18.5){
      		cout<<"Underweight";
      	}
      	if(a>=18.5&&a<24){
      		cout<<"Normal";
      	}
      	if(a>=24){
      		cout<<a<<endl;
      		cout<<"Overweight";
      	}
      	return 0;
      }
      
      
      
      • -3
        @ 2025-10-8 14:52:26

        #include<bits/stdc++.h> using namespace std; int main() { double a,b; cin>>a>>b; if(a/(bb)<=24 and a/(bb)>=18.5) { cout<<"Normal"; } else if(a/(bb)>24) { double d=a/(bb); cout<<fixed<<setprecision(4)<<d<<endl; cout<<"Overweight"; } else if (a/(b*b)<18.5) { cout<<"Underweight"; } return 0; }

        • 1

        Information

        ID
        1490
        Time
        1000ms
        Memory
        256MiB
        Difficulty
        1
        Tags
        (None)
        # Submissions
        113
        Accepted
        40
        Uploaded By