int main(int argc, const char * argv[]) {
int sale, num;
int salary = 500;
printf("请输入你的销售额:\n");
scanf("%d",&sale);
if (sale / 1000 == 0) {
num = sale /1000;
}else num = sale + 1;
switch (num) {
case 0:
case 1:
case 2: printf("你的工资为:%d",salary); break;
case 3:
case 4:
case 5: printf("你的工资:%.2f",salary+sale*0.08);break;
case 6:
case 7:
case 8:
case 9:
case 10: printf("你的工资:%.2f",salary+sale*0.1);break;
default: printf("你的工资:%.2f",salary+sale*0.12);break;
}