问题出在哪
package com.imooc;
public class MyJava {
public static void main(String[] args) {
int one = 21;
String jieguo;
int res=one%2;
if(res==0)
jieguo="偶数";
if(!(res==0));
jieguo="非偶数";
System.out.println(jieguo);
}
}
package com.imooc;
public class MyJava {
public static void main(String[] args) {
int one = 21;
String jieguo;
int res=one%2;
if(res==0)
jieguo="偶数";
if(!(res==0));
jieguo="非偶数";
System.out.println(jieguo);
}
}
2016-10-24
举报