6 solutions
Information
- ID
- 392
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 6
- Tags
- # Submissions
- 354
- Accepted
- 113
- Uploaded By
using namespace std;
int main()
{
double a,b;
cin>>a>>b;
a=a/(b*b);
if(a<18.5)
{
cout<<"Underweight";
}
else if(a>=18.5&&a<24)
{
cout<<"Normal";
}
else
{
cout<<a;
cout<<endl;
cout<<"Overweight";
}
return 0;
}
判断就好了,但要用double
By signing up a Hydro universal account, you can submit code and join discussions in all online judging services provided by us.