求助,程序已经出来,求大神指点
# include <stdio.h>float f(int s)
{float z,d;
int c;
if (s>=1000) c=10;
else c=s/100;
switch(c)
{
case 0:d=0;
case 1:d=3;break;
case 2:
case 3:
case 4:d=2;
case 5:d=1;break;
case 6:
case 7:d=4;
}
z=s*d/100.0;
printf("%15.1\n",z);
}
main()
{int x=200;
f(x);
}