level 2
逐日___
楼主
public class Bonus
{
public static void main(String []args){
Scanner sc = Scanner(System.in);
double I = sc.nextDouble();
if (I<=100000)
{
System.out.println("发放奖金为:"+I*10%);
}
else(100000<=I<=200000)
{
double = b;
b = I-100000;
System.out.println("发放奖金为:"+b*7.5%+100000*10%);
}
else(200000<=I<=400000)
{
double = b;
b = I - 200000;
System.out.println("发放奖金为:"+b*5%+100000*10%+100000*7.5%);
}
else(400000<=I<=600000)
{
double = b;
b = I - 400000;
System.out.println("发放奖金为:"+b*3%+200000*5%+100000*7.5%+100000*10%);
}
else(600000<=I<=1000000)
{
double = b;
b = I - 6000000;
System.out.println("发放奖金为:"+b*1.5%+200000*3%+200000*5%+100000*7.5%+100000*10%);
}
else(I>=1000000)
{
double = b;
b = I - 1000000;
System.out.println("发放奖金为:"+b*1%+400000*1.5%+200000*3%+200000*5%+100000*7.5%+100000*10%);
}
}
}
2015年01月11日 11点01分
1
{
public static void main(String []args){
Scanner sc = Scanner(System.in);
double I = sc.nextDouble();
if (I<=100000)
{
System.out.println("发放奖金为:"+I*10%);
}
else(100000<=I<=200000)
{
double = b;
b = I-100000;
System.out.println("发放奖金为:"+b*7.5%+100000*10%);
}
else(200000<=I<=400000)
{
double = b;
b = I - 200000;
System.out.println("发放奖金为:"+b*5%+100000*10%+100000*7.5%);
}
else(400000<=I<=600000)
{
double = b;
b = I - 400000;
System.out.println("发放奖金为:"+b*3%+200000*5%+100000*7.5%+100000*10%);
}
else(600000<=I<=1000000)
{
double = b;
b = I - 6000000;
System.out.println("发放奖金为:"+b*1.5%+200000*3%+200000*5%+100000*7.5%+100000*10%);
}
else(I>=1000000)
{
double = b;
b = I - 1000000;
System.out.println("发放奖金为:"+b*1%+400000*1.5%+200000*3%+200000*5%+100000*7.5%+100000*10%);
}
}
}