1000----2000年之间的闰年
#include<stdio.h>#include<stdlib.h>intmain(){intyear=0;intcount=0;//计算有多少个闰年for(year=1000;year<=2000;year++){if((year%4==0&&year%100!=0)||(year%400==0)){printf("%5d",year);count++;}}printf("\n");printf("%d\n",count);system("pause");return0;}
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。