package blog; import java.util.Scanner; public class year { public static void main(String[] args) { year(); } static void year() { Scanner input = new Scanner(System.in); int y = input.nextInt(); if((y % 4 == 0 && y % 100 != 0) || y % 4 == 0) { System.out.println(y+"年为闰年"); }else { System.out.println(y+"年不是闰年"); } } }