我覺得我寫的 和答案 一樣啊 為什么 就是不能運(yùn)行呢
public class HelloWorld {
? ? public static void main(String[] args) {
int age=25;
? ? if(age>60){
? ? ? ? System.out.println("老年");
? ? }else if(age>40){
? ? ? ? System.out.println("中年");
? ? }else if(age>18){
? ? ? ? System.out.println("少年");
? ? }else{
? ? ? ? System.out.println("童年");
? ? }
}
}
2019-11-10
你if后面的括號(hào)是中文符號(hào),要改成英文狀態(tài)的()才行,注意中英文符號(hào)