public class exercise_719_08 {
public static void main(String[] args) {
System.out.println(“请输入当月利润:”);
Scanner scanner = new Scanner(System.in);
try {
int I = scanner.nextInt();
double num = 0;
if (I>0) {
if ( I <= 10) {
num = I * 0.1;
} else if (I > 10 && I <= 20) {
num = 100.1+(I-10)0.075;
} else if (I > 20 && I <= 40) {
num = 100.1+100.075+(I-20)0.05;
} else if (I > 40 && I <= 60) {
num = 100.1+100.075+200.05+(I-40)0.03;
} else if (I >60 && I <= 100) {
num = 100.1+100.075+200.05+200.03+(I-60)0.015;
} else {
num = 100.1+100.075+200.05+200.03+40*0.015+(I-100)*0.01;
}
System.out.println(num+“万”);
}else {
System.err.println(“输入有误”);
}
} catch (Exception e) {
// TODO: handle exception
System.err.println("输入有误");
}finally {
scanner.close();
}
}
}