闰年平年
package hnkjxy;
import java.util.Scanner;
public class 闰年平年 {
public static void main(String [] args){
Scanner input=new Scanner(System.in);
System.out.println("请输入四位数的年份:");
int a=input.nextInt();
if ((a%4==0 && a%100!=0)||(a%400==0)){
System.out.println(a + "年是闰年。");
}else {
System.out.println(a+"年不是闰年。");
}
}
}
路是自己的,没必要拿别人的标准衡量自己,它只配成为垫脚石。

浙公网安备 33010602011771号