#include <stdio.h>
#include <stdlib.h>
int main()
{
float h,w;
printf ("Please enter h,w:\n",h,w);
scanf("%f,%f",&h,&w);
float t;
t =w/(h*h);
if (t<18)
{
printf("t=%f\tLower weight!\n",t);
}
else if(t>=18&&t<=25)
{
printf("t=%f\tStandard weight!\n",t);
}
else if(t>25&&t<27);
{
printf("t=%f\tHigher weight!\n",t);
}
else
printf("t=%f\tToo fat!\n",t);
return 0;
}
报错:else without a previous if