闰年平年

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+"年不是闰年。");

        }

        }
    }

  

posted @ 2020-03-22 14:07  初雨了然  阅读(206)  评论(0)    收藏  举报