以下是引用xy4919961在2009-11-24 18:33:22的发言:
#include <stdio.h>
main()
{
float i=0,z;
printf("xiaofei:");
scanf("%f",&i);
z=i/100;
switch(z)
{
case 9:case 8:
printf("%1.2f",i*0.5);break;
case 7:case 6:
printf("%1.2f",i*0.6);break;
...
这个有错吧,,switch参数有错,不能是float的
error C2050: switch expression not integral