文章
3
粉丝
260
获赞
4
访问
28.2k
#include<stdio.h>
struct date{
int year;
int month;
int day;
};
//int FYear[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
int FYear[12]={31,28,31,30,31,30,31,31,30,31,30,31};
int main(){
struct date d;
while(scanf("%d %d %d",&d.year,&d.month,&d.day)!=EOF){
if(d.month<1||d.month>12){
printf("Input error!\n");
continue;
}
int day=0;
if(d.year%400==0||(d.year%100!=0&&d.year%4==0)){
FYear[1]=29;
}
&n...
登录后发布评论
暂无评论,来抢沙发