Flamer


私信TA

用户名:ding876255970

访问量:46806

签 名:

不怕别人比你优秀,就怕别人比你努力!

等  级
排  名 124
经  验 7517
参赛次数 0
文章发表 49
年  龄 0
在职情况 学生
学  校
专  业

  自我简介:

解题思路:





注意事项:





参考代码:

#include<stdio.h>
int main()
{
int x,s;
scanf("%d",&x);
if(x>0 && x<=100000)
{
s=x*0.1;
}
else if(x>100000 && x<=200000)
{
s=(x-100000)*0.075+100000*0.1;
}
else if(x>200000 && x<=400000)
{
s=(x-200000)*0.05+100000*(0.1+0.075);
}
else if(x>400000 && x<=600000)
{
s=(x-400000)*0.03+100000*(0.1+0.075)+200000*0.05;
}
else if(x>600000 && x<=1000000)
{
s=(x-600000)*0.015+100000*(0.1+0.075)+200000*(0.05+0.03);
}
else
{
s=(x-1000000)*0.01+100000*(0.1+0.075)+200000*(0.05+0.03)+400000*0.15;
}
printf("%d\n",s);
return 0;
}


 

0.0分

0 人评分

  评论区