int year = 2008; int month = 8; int day = 8; int Day; for(month=1;month<8;month++) { if(month==1 && month==3 && month==5 && month==7) { Day+=31; continue; } if(year%4==0) { Day+=29; continue; } if(year%4!=0) { Day+=28; continue; } Day+=30; } Day=Day+day; printf("%d年%d月%d日是该年的第%d天",yaer,month,day,Day); return 0;
添加回答
举报
0/150
提交
取消