www.28365365.com
Yamako OJ,今年的第一天,寻求神灵
日期:2019-04-18
展开全部
#includestdio
提示主要(intarc,char * argv[]){年,月,日; intsum = 0; intleap,错误= 0。INTN; INT *一个; scanf函数(%d,A =(INT *)malloc的(N *的sizeof(INT)); INTI = 0;(I = 0;ⅱ++){如果误差= 0; scanf函数(%d-%d-%d),(&a?o和月,如果((a%100 == 0 && a%400 == 0))||(a%4 == 0 && ao%100!
= 0)){jump = 1;}else{jump = 0;}switch(month){case 1:if(day 31){a[i]= -1;}error = 1;}total = 0;:是(跳= = 1){if(第29天){a[i]= -1; else = if(第28天){a[i]= -1;错误= 1;}}错误= 1总计= 31;暂停case3:if(第31天){a[i]= -1;错误= 1;}总计= 31 + 28;中断案例4:if(第30天){a[i]= -1;错误= 1;}sum = 31 + 28 + 31;中断情况5:if(第31天){a[i]= -1;错误= 1;}sum = 31 + 28 + 31 + 30;中断案例6:是(第30天){a[i]= -1;错误= 1;}总计= 31 + 28 + 31 + 30 + 31;暂停案例7:如果(第31天){a[i]=-1;错误= 1;}总计= 31 + 28 + 31 + 30 + 31 + 30;暂停案例8:是(第31天){a[i]= -1;错误= 1;}总计= 31+ 28 + 31 + 30 + 31 + 30 + 31;中断。案例9:如果(第30天){a[i]= -1;错误= 1;}总计= 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31;中断案例10:如果(第31天){a[i]= -1; errum = 1;}sum = 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30。中断情况11:是(第30天){a[i]= -1; errum = 1;}sum = 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31。pause12; case 12:if(第31天){a[i]= -1; errum = 1;}sum = 31 + 28 + 31 + 30 + 31 + 31 + 31 + 30 + 31 + 30。暂停默认值:a[i]= -1。错误= 1。中断;}if(错误!
= 1){sum + = day; if(jump = = 1 && month 2){sum + = 1;}a[i]= sum;}}(i = 0; ii ++){if(a[i]== - 1)Printf(errordate)!
n); elseprintf(%dn,a[i]);}return 0;}