解题思路:
注意事项:
参考代码:
import java.util.Scanner;
public class Main { public static void main(String[] args) { Scanner scanner=new Scanner(System.in); double a=0; int y=scanner.nextInt(); if (y<=100000){ a=y*0.1; }else if (y>100000&&y<=200000){ a=100000*0.1+(y-100000)*0.075; }else if (y>200000&&y<=400000){ a=100000*0.1+(y-100000)*0.075+(y-200000)*0.05; }else if (y>400000&&y<=600000){ a=100000*0.1+(y-100000)*0.075+(y-200000)*0.05+(y-400000)*0.03; }else if (y>600000&&y<=1000000){ a=100000*0.1+(y-100000)*0.075+(y-200000)*0.05+(y-400000)*0.03+(y-600000)*0.015; }else if (y>1000000){ a=100000*0.1+(y-100000)*0.075+(y-200000)*0.05+(y-400000)*0.03+(y-600000)*0.015+(y-1000000)*0.01; } System.out.println((int)a); } }
0.0分
0 人评分
小九九 (C语言代码)浏览:884 |
C语言程序设计教程(第三版)课后习题6.4 (C语言代码)浏览:623 |
A+B for Input-Output Practice (C++代码)浏览:632 |
打水问题 (C语言代码)浏览:1148 |
C语言训练-求1+2!+3!+...+N!的和 (C语言代码)万恶的long long浏览:906 |
WU-复数求和 (C++代码)浏览:2119 |
WU-格式化数据输出 (C语言代码)浏览:1818 |
【明明的随机数】 (C语言代码)浏览:845 |
简单的a+b (C语言代码)浏览:572 |
简单的a+b (C语言代码)浏览:683 |