Debug_Simple
題目說明
- 請針對以下程式碼進行除錯
- 補上華氏(F)轉攝氏(C)公式:C=(F-32)x5÷9
- 使用已宣告的變數(weather和C)顯示正確的結果
vvv請debug以下程式碼vvv
public class Test_0926 {
public static void main(String[] args) {
int weather="sunny";
int F=95.0;//華氏
int C=;//華氏轉攝氏公式:C=(F-32)x5÷9
System.out.println("Today is a day.The temperature is.");//請依照題目要求輸出正確的內容
}
}
輸入
本題無輸入
輸出
Today is a sunny day.
The temperature is 35.
範例輸出 #1
Today is a sunny day.
The temperature is 35.
Comments
import java.util.Scanner; public class debug程式碼 {
import java.util.Scanner; public class debug程式碼 {