試圖獲得此輸入5個不同的溫度讀數,並輸出最低的輸入。 Im new to java使用循環輸入
System.out.println("Enter 5 temperature readings");
Scanner input = new Scanner(System.in);
int count = 1;
while (count <= 5){
int temp = input.nextInt();
if (temp < temp){
low = temp;
}
count++;
}
System.out.println(------);
你的問題是什麼?什麼不行?爲什麼?你期望它做什麼? – BackSlash
你的問題是什麼?你的代碼有什麼問題? –
你的問題在哪裏? –