public static void main(String[] args) {
//判断一个数的奇偶性
check(5);
}
public static void check(int number){
if (number % 2 ==0){
System.out.println(number+ "是偶数");
}else {
System.out.println(number + "是奇数");
}
}
2023-09-28 20:27:58
public static void main(String[] args) {
//判断一个数的奇偶性
check(5);
}
public static void check(int number){
if (number % 2 ==0){
System.out.println(number+ "是偶数");
}else {
System.out.println(number + "是奇数");
}
}
下一篇:HTML练习之路12