2 solutions

  • 0
    @ 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;
    }
    
    
    
    • -1
      @ 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
      68
      Accepted
      23
      Uploaded By