请问大佬们,这个要怎么更正,才能使jieguo和Money都能够输入呢?
[code]
import java.util.Scanner;
public class Chapter3shoppinggiesuan {
/**
* @param args
*/
public static void main(String[] args) {
System.out.println("请输入是否是会员:是(y)/否(其他字符)");
Scanner sc = new Scanner (System.in);
String JieGuo = sc.toString();
Scanner se = new Scanner (System.in);
double Money = se.nextDouble();
if(JieGuo.equals ("y")){
System.out.println("请输入购物金额:"+Money);
if(Money>200){
System.out.println("实际支付:"+(Money*0.75));
}else if(Money<200){
System.out.println("实际支付:"+(Money*0.8));
}else{
if(Money>100){
System.out.println("实际支付:"+(Money*0.9));
}else if(Money<100){
System.out.println("实际支付:"+Money);
}
}
}
// TODO Auto-generated method stub
}
}
/code]