标签:
1 #include <iostream> 2 using namespace std; 3 int main() 4 { 5 int m,a; 6 cin>>m; 7 if(m<=100000) 8 { 9 a=m*0.1; 10 cout<<a; 11 } 12 13 else if(100000<m<=200000) 14 { 15 a=100000*0.1+(m-100000)*0.075; 16 cout<<a; 17 } 18 19 else if(200000<m<=400000) 20 { 21 a=100000*0.1+100000*0.75+(m-200000)*0.05; 22 cout<<a; 23 } 24 else if(400000<m<=600000) 25 { 26 a=100000*0.1+100000*0.75+200000*0.5+(m-400000)*0.03; 27 cout<<a; 28 } 29 30 else if(600000<m<=1000000) 31 { 32 a=100000*0.1+100000*0.75+200000*0.5+200000*0.3+(1000000-600000)*0.015; 33 cout<<a; 34 } 35 36 else if(1000000<m) 37 { 38 a=100000*0.1+100000*0.75+200000*0.5+200000*0.3+(m-1000000)*0.01; 39 cout<<a; 40 } 41 42 return 0; 43 44 }
标签:
原文地址:http://www.cnblogs.com/wangmengmeng/p/4542549.html