import java.util.Scanner;public class Testif {public static void main(String[] args) {// TODO 自动生成的方法存根 Scanner scan =new Scanner(System.in);System.out.println("请输入一个整数:");long number =scan.nextLong(36);String check =(number%2==0)? "这个数字是: 偶数" :"这个数字是: 奇数";System.out.println(check); }}
public class ParityCheck {public static void main(String[] args) {// TODO 自动生成的方法存根int number=33;if(number%2==0){System.out.println("number为偶数");}else {System.out.println("number为奇数");}}}