奖金计算小程序C语言

Contributor:最懒的崽 Type:English Date time:2021-01-12 10:39:27 Favorite:14 Score:0
返回上页 Report
请选择举报理由:




Collection Modify the typo
#include"stdio.h"
main()
{
long int i;
int bonus1,bonus2,bonus4,bonus6,bonus10,bonus;
scanf("%ld",&i);
bonus1=100000*0.1;bonus2=bonus1+100000*0.75;
bonus4=bonus2=200000*0.5;
bonus6=bonus4+200000*0.3;
bonus10=bonus6+400000*0.15;
if(i<=100000)
bonus=i*0.1;
else if(i<=200000)
bonus=bonus1+(i-100000)*0.075;
else if(i<=400000)
bonus=bonus2+(i-200000)*0.05;
else if(i<=600000)
bonus=bonus4+(i-400000)*0.03;
else if(i<=1000000)
bonus=bonus6=(i-600000)*0.015;
else
bonus=bonus10=(i-1000000)*0.01;
printf("bonus=%d",bonus);
}
声明:以上文章均为用户自行添加,仅供打字交流使用,不代表本站观点,本站不承担任何法律责任,特此声明!如果有侵犯到您的权利,请及时联系我们删除。
Hot degree:
Difficulty:
quality:
Description: the system according to the heat, the difficulty, the quality of automatic certification, the certification of the article will be involved in typing!

This paper typing ranking TOP20

登录后可见

用户更多文章推荐