这个C程序哪里错了?
橄榄丝 2006-08-07 04:55:54 #include<stdio.h>
void main()
{
double profit,prize,a,b,c,d,e,f,sum; //profit表示利润,prize表示奖金,单位是万。
printf("\n请输入利润:");
scanf("%f",&profit);
switch(profit)
{
case(profit<=10):
a=profit*0.1;
printf("\n10万元内的奖金为:%f",a);
break;
case(profit>10&&profit<20):
b=(profit-10)*0.075;
printf("\n高于10万元部分的奖金为:%f",b);
break;
case(profit>20&&profit<40):
c=(profit-20)*0.05;
printf("\n高于20万元部分的奖金为:%f",c);
break;
case(profit>40&&profit<60):
d=(profit-40)*0.03;
printf("\n高于40万元部分的奖金:%f",d);
break;
case(profit>60&&profit<100):
e=(profit-60)*0.1.5;
printf("\n高于60万元部分的奖金:%f",e);
break;
case(profit>100):
f=(profit-100)*0.01;
printf("\n高于100万元部分的奖金:%f",f);
break;
default:
printf("\n无法计算\n");
}
sum=a+b+c+d+e+f;
printf("\n发放奖金的总和是:%f",sum);
}