java打折程序,有几个不明白,能帮忙写下源代码吗
import java.util.*;
public class dazhe{
public static void main(String[] arg0){
Scanner in=new Scanner(System.in);
String huiyuan;double jiner;
System.out.println("***************打折系统**************:");
System.out.println("请输入是否是会员:是(y)/否(其他字符)");
huiyuan=in.next();
System.out.println("请输入购物金额");
jiner=in.nextDouble();
System.out.println((int)jiner);
if(huiyuan=="y")
{
if(jiner>=100&jiner<=200)
{ jiner=jiner*0.8;
System.out.println("实付金额:");
System.out.println((int)jiner);}
else if(jiner>200)
{
jiner=jiner*0.75;
System.out.println("实付金额:");
System.out.println((int)jiner);
}
else if(jiner>=100)
{
jiner=jiner*0.85;
System.out.println("实付金额:");
System.out.println(jiner);}
}
else {System.out.println("实付金额:");
System.out.println(jiner);}
}
}