package com.sosee;
import java.util.Scanner;
import com.sosee.lvc;
public class lvc {
public boolean isLeapYear(int year) {
boolean isLeap = false;
calcLeapYear();
if (year%4!=0) {
isLeap=false;
System.out.println("该年不是闰年"+year);}
else if(year%400!=0&&year%100==0)
{
isLeap=false;
System.out.println("该年不是闰年"+year);}
if (year % 4 == 0 && year % 100 != 0) {
isLeap = true;
System.out.println("该年是闰年"+year);
} else if (year % 400 == 0) {
isLeap = true;
System.out.println("该年是闰年"+year);
}
return isLeap;
}
public void calcLeapYear() {
Scanner sc=new Scanner(System.in);
int[] year=new int[5];
for(int i=0;i<year.length;i++) {
System.out.println("请输入5个年份:");
year[i]=sc.nextInt();
}
sc.close();
}
public static void main(String[] args) {
lvc studentMange=new lvc();
studentMange.calcLeapYear();
studentMange.calcLeapYear();
}
}