求大神指點(diǎn),在eclipse中輸入數(shù)字后沒有反應(yīng)
System.out.println("歡迎來到答答租車!\n您是否要租車? 1 是 ?0 否");
Scanner input = new Scanner (System.in);
if (input.nextInt() != 1 && input.nextInt() != 0 ){
System.out.println("您的輸入有誤,請(qǐng)重新輸入");
}else if (input.nextInt() == 0){
System.out.println("歡迎下次光臨!");
}else if (input.nextInt() == 1){
System.out.println("您所能租車列表");
System.out.println ("序號(hào)" + "\t" + "車名" + "\t" + "載客量" + "\t" + "載貨量" + "\t" + "價(jià)格");
for (int i=0; i<cars.length; i++){
cars[i].list();
}
}
2016-10-14
輸入數(shù)字 ??
進(jìn)入for循環(huán)結(jié)束 ? ? // for循環(huán)你什么都沒輸出 ? ?就擺了個(gè)式子 ?兄弟
2016-10-12
for循環(huán)你想要表達(dá)什么??
2016-10-12
代碼有誤