publicclass Test{
publicstatic void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("请输入一个整数:");
long num =scanner.nextLong();
String s = (num%2 == 0) ? "这个数是偶数。" :"这个数是奇数。"; //三元运算符
System.out.println(s);
}
}