请问为什么这里得不出预定的结果,是哪里出现了低级错误吗?
#include <iostream>
#include <iomanip>
#include <math.h>
using namespace std;
int main()
{
float m,h,x;
cin>>m>>h;
x=m/pow(h,2);
if (x<18.5)
cout<<"Underweight";
else if (18.5<=x<24)
cout<<"Normal";
else if (x>=24)
cout<<x<<endl<<"Overweight";
return 0;
}
这里是结果