拒绝荧光剂  •  11个月前


include

using namespace std; int main(){ int year,mouth,day,X,N; int c=0; cin>>year>>mouth>>day; if((year%4==0&&year%100!=0)||(year%400==0))c=1; if((mouth==2&&day>=3)||(mouth==5&&day<5)||(mouth==3||mouth==4)){ switch(mouth){ case 2:X=91+c;N=day-2; break; case 3:X=91+c;N=day+26+c;break; case 4:X=91+c;N=day+26+c+31;break; case 5:X=91+c;N=day+26+c+31+30;break; }cout<<"Spring"<<" "<<X<<" "<<N;} if((mouth==5&&day>=5)||(mouth==8&&day<7)||(mouth==6||mouth==7)){ switch(mouth){ case 5:X=94;N=day-4; break; case 6:X=94;N=day+27;break; case 7:X=94;N=day+27+30;break; case 8:;X=94;N=day+27+30+31;break; }cout<<"Summer"<<" "<<X<<" "<<N;} if((mouth==8&&day>=7)||(mouth==11&&day<7)||(mouth==9||mouth==10)){ switch(mouth){ case 8:X=92;N=day-6; break; case 9:X=92;N=day+25;break; case 10:X=92;N=day+25+30;break; case 11:X=92;N=day+25+30+31;break; }cout<<"Autumn"<<" "<<X<<" "<<N;} if((mouth==11&&day>=7)||(mouth==2&&day<3)||(mouth==12||mouth==1)){ switch(mouth){ case 11:X=88;N=day-6; break; case 12:X=88;N=day+24;break; case 1:X=88;N=day+24+31;break; case 2:X=88;N=day+24+30+31;break; }cout<<"Winter"<<" "<<X<<" "<<N;}

return 0; }


评论:

请先登录,才能进行评论