文章
21
粉丝
76
获赞
1
访问
13.7k
#include<stdio.h>
struct node{
int year;
int month;
int day;
}p;
int main(void){
while(scanf("%d %d %d",&p.year,&p.month,&p.day) !=EOF){
int days[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31};
int flag = 0;
int sum = 0;
if(p.year<0 || p.year>9999){
flag = 1;
}
if(p.month<1 || p.month>12){
flag = 1;
}
for(int i = 1;i<=12;i++){
if(p.day<=0 || p.day>days[i]){
&nbs...
登录后发布评论
这里判断有问题