按照人家輸的,不知道哪錯了
public class HelloWorld {
? ? public static void main(String[] args) {
int one = 20 ;
String res;
? ? if((one%2)==0)
? ? ? ? ? ? res ="偶數";
? ? ? ? else
? ? ? ? ? ? res ="奇數";
? ? ? ? System.out.print("one是"+res);
}
}
哪錯了搞不懂
public class HelloWorld {
? ? public static void main(String[] args) {
int one = 20 ;
String res;
? ? if((one%2)==0)
? ? ? ? ? ? res ="偶數";
? ? ? ? else
? ? ? ? ? ? res ="奇數";
? ? ? ? System.out.print("one是"+res);
}
}
哪錯了搞不懂
2019-06-17
舉報
2019-06-18
我復制你的代碼到ide 發現 11行 代碼 的分號是中文的 改成英文即可
2019-06-18
偶數后面分號改成中文