public class LeapYearFor {
public static void main(String args[]){
int i,j=0;
// int year=0;
for(i=1800;i<=2014;i++){
// if((year%4==0&&year%100!=0)||(year%400==0)) {
if((i%4==0&&i%100!=0)||(i%400==0)) {
j++;
// System.out.print(j+"\t");
System.out.print(i+"\t");
if(j%5==0) {System.out.println();}
}
}
// if(year%5==0) System.out.println();
}
}
虚假![](https://img-blog.csdn.net/20140408130924718?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvdTAxNDAyNjkyNg==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)