#include <stdio.h> int main() { int benefit, bonus//建变量 scanf("%d", &benefit); if (benefit <= 100000)//分类讨论 { bonus = 0.1*benefit;//计算奖金 } else if (100000<benefit && benefit<=200000) { bonus = (0.1*100000)+((benefit-100000)*0.075);//计算奖金 } else if (200000 < benefit && benefit <= 400000) { bonus = (0.1*100000)+(0.075*100000)+((benefit-200000)*0.05); } else if (400000 < benefit && benefit <= 600000) { bonus = (0.1*100000)+(0.075*100000)+(0.05*200000)+((benefit-400000)*0.03); } else if (600000 < benefit && benefit <= 1000000) { bonus = (0.1*100000)+(0.075*100000)+(0.05*200000)+(0.03*200000)+((benefit-600000)*0.015); } else { bonus = (0.1*100000)+(0.075*100000)+(0.05*200000)+(0.03*200000)+(0.015*400000)+((benefit-1000000)*0.01); } printf("%d", bonus); return 0; }
0.0分
0 人评分