import java.util.Scanner;
public class CalculatedBonus {
public static void main(String[] args) {
double profit=0;
double royalty=0;
System.out.print("输入当月利润(单位万):");
Scanner sc=new Scanner(System.in);
profit=sc.nextDouble();
if (profit <= 10)
{
royalty = profit*0.1;
}
else if (profit > 10 && profit <= 20)
{
royalty = (profit - 10)*0.075 + 10 * 0.1;
}
else if (profit > 20 && profit <= 40)
{
royalty = (profit - 20)*0.05 + 10 * 0.1+10*0.075;
}
else if (profit > 40 && profit <= 60)
{
royalty = (profit - 40)*0.03 + 10 * 0.1 + 10 * 0.075+20*0.05;
}
else if (profit > 60 && profit <= 100)
{
royalty = (profit - 60)*0.015 + 10 * 0.1 + 10 * 0.075 + 20 * 0.05+20*0.03;
}
else if (profit > 100)
{
royalty = (profit - 100)*0.01 + 10 * 0.1 + 10 * 0.075 + 20 * 0.05 + 20 * 0.03+40*0.015;
}
System.out.print("提成为:"+royalty+"万元\n");
sc.close();
}
}