求switch解法
#include"stdio.h"main(){
long profit;
int grade;
float salary=500;
printf("input profit");
scanf("%1d",&profit);
grade=(profit-1)/1000;
switch(grade)
{
case 0:break;
case 1:salary+=profit*0.1;break;
case 2:
case 3:
case 4:salary+=profit*0.15;break;
case 5:
case 6:
case 7:
case 8:
case 9:salary+=profit*0.2;break;
default:salary+=profit*0.25;break;
}
printf("salary=%.2f\n",salary);
}
请教怎么跳不到switch中