package wei;
import java.util.Scanner;
/**
* 奇偶数判断
* @author Jun
*
*/
public class ParityCheck {
/**
* @param args
*/
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("请输入数字:");
long number = scanner.nextLong();
String check = (number%2==0)?"偶数":"奇数";
System.out.println(check);
}
}
源码:奇偶数判断
最新推荐文章于 2023-11-05 20:08:27 发布