哎,代码写的太不规范了,呵呵
public class aaa {
public static void main(String[] args){
int totalcost=500;
if (totalcost>=200&&totalcost<300)
{
System.out.println("可获得优惠卷");
}
else
{
}
if (totalcost>300&&totalcost<500)
{
System.out.println("可获得五十远");
}
else
{ ........................................................这里则么会报错
}
if (totalcost>500)
{
System.out.println("100yuan");
}
else
{
System.out.println("你的消费金额不足");
}
}
}
这样是不是好一点啊 |