文章
9
粉丝
0
获赞
0
访问
6.6k
#include<stdio.h>
struct note{
int year;
int month;
int day;
}x;
int main(){
while(scanf("%d%d%d",&x.year,&x.month,&x.day)!=EOF){
if(x.year<0||x.month<1||x.month>12){
printf("Input error!\n");
continue;}
if(x.month==1||x.month==3||x.month==5||x.month==7||x.month==8||x.month==10||x.month==12){
if(x.day>31){
printf("Input error!\n");
continue;}
}
if(x.month==4||x.month==6||x.month==9||x.month==11){
if(x.day>30){
printf("Input error!\n");
continue;}
}
int two;int flag=0;
if((x.year%4 == 0&&x.y...
登录后发布评论
1月31日