纯粹就语法而言
there: if(((month==1||month==3||month==5||month==7||month==8||month==10||month==12)&&(data>31))||((month==2)&&(data>29))||((month==4||month==6||month==9||month==11)&&(data>31)))
{printf("the data error!please enter again\n");
scanf("%d,%d,%d",&year,&month,&data);
goto there;}
应该可以写作
while(((month==1||month==3||month==5||month==7||month==8||month==10||month==12)&&(data>31))||((month==2)&&(data>29))||((month==4||month==6||month==9||month==11)&&(data>31)))
{printf("the data error!please enter again\n");
scanf("%d,%d,%d",&year,&month,&data);
}
there: if(((month==1||month==3||month==5||month==7||month==8||month==10||month==12)&&(data>31))||((month==2)&&(data>29))||((month==4||month==6||month==9||month==11)&&(data>31)))
{printf("the data error!please enter again\n");
scanf("%d,%d,%d",&year,&month,&data);
goto there;}
应该可以写作
while(((month==1||month==3||month==5||month==7||month==8||month==10||month==12)&&(data>31))||((month==2)&&(data>29))||((month==4||month==6||month==9||month==11)&&(data>31)))
{printf("the data error!please enter again\n");
scanf("%d,%d,%d",&year,&month,&data);
}
对宇宙最严谨的描述应该就是宇宙其实是不严谨的