判断一个数是偶数还是奇数:
int number = 5; // Find out if the number above is even or odd if (number % 2 == 0) { System.out.println(number + " is even."); } else { System.out.println(number + " is odd."); }
int number = 5; // Find out if the number above is even or odd if (number % 2 == 0) { System.out.println(number + " is even."); } else { System.out.println(number + " is odd.");
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!