#include<stdio.h>
int main()
{
int i=0;
int year,l;
for(year=1000;year<2000;year++)
{
if(year%4==0)
if(year%100==0)
if(year%400==0)
l=1;
else
l=0;
else
l=1;
else
l=0;
if(l)
{i++;
printf("闰年的年份为");
printf("%d\n",year);
if(i%3==0)
printf("\n");
}
}
return 0;
}
int main()
{
int i=0;
int year,l;
for(year=1000;year<2000;year++)
{
if(year%4==0)
if(year%100==0)
if(year%400==0)
l=1;
else
l=0;
else
l=1;
else
l=0;
if(l)
{i++;
printf("闰年的年份为");
printf("%d\n",year);
if(i%3==0)
printf("\n");
}
}
return 0;
}