小白虚心求教
#include<stdio.h>main()
{
float w,t,fat;
printf("please input tall(t) and weight(w):\n");
scanf("t=%f,w=%f",&t,&w);
fat=w/(t*t);
switch(fat)
{
case fat<=18:printf("you are too thin :\n");break;
case fat>18&&fat<=23.9:printf("you are standard!:\n");break;
case fat>23.9&&fat<=27.9:printf("you are fat :\n");break;
}
}
出现错误, [Error] switch quantity not an integer
没有看明白
求教 谢谢~