解题思路:
注意事项:
参考代码:
#include <stdio.h>
#include <stdlib.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(void) {
int a,s,d,f,x,y,y1,z;
scanf("%d",&x);
if(x<=100000)
{y=x*0.1;
printf("%d",y);}
if(x>100000&&x<=200000)
{a=(x-100000)*0.075;
y1=100000*0.1;
y=y1+a;
printf("%d",y);}
if(x>200000&&x<=400000)
{a=(x-200000)*0.05;
y1=100000*0.075;
z=100000*0.1;
y=y1+a+z;
printf("%d",y);}
if(x>400000&&x<=600000)
{s=(x-400000)*0.03;
a=200000*0.05;
y1=100000*0.075;
z=100000*0.1;
y=y1+a+z+s;
printf("%d",y);}
if(x>600000&&x<=1000000)
{d=(x-600000)*0.015;
s=200000*0.03;
a=200000*0.05;
y1=100000*0.075;
z=100000*0.1;
y=y1+a+z+s+d;
printf("%d",y);}
if(x>1000000)
{f=(x-1000000)*0.01;
d=400000*0.015;
s=200000*0.03;
a=200000*0.05;
y1=100000*0.075;
z=100000*0.1;
y=y1+a+z+s+d+f;
printf("%d",y);}
return 0;
}
0.0分
1 人评分