switch(grade case 0:break; /*profit≤1000*/ case 1:salary +profit*0.1;break;/*1000<profit<2000*/ case 2: case 3: case 4:salary +=profit*0.15;break;/*2000<profit<5000*/ case 5: case 6: case 7: case 8: case 9:salary +profit*0.2;break;/*5000<profit<10000*/ default:salary +=profit*0.25; /*10000<profit*/ printf("salary-%.2fn",salary); getch(); 2024/10/28 39 2024/10/28 39 switch( grade ) { case 0: break; /*profit≤1000 */ case 1: salary += profit*0.1; break; /*1000<profit≤2000 */ case 2: case 3: case 4: salary += profit*0.15;break; /*2000<profit≤5000 */ case 5: case 6: case 7: case 8: case 9: salary += profit*0.2; break; /*5000<profit≤10000 */ default: salary += profit*0.25; /*10000<profit */ } printf("salary=%.2f\n", salary); getch(); }