文章
17
粉丝
148
获赞
3
访问
180.8k
#include <iostream>
using namespace std;
int date[12] = {31,29,31,30,31,30,31,31,30,31,30,31};
int main(void){
int mon,day,sum=0;
cin >> mon >> day;
if(mon==4){
sum=day-12;
}else{
sum+=18;
sum+=day;
for(int i=5;i<mon;i++){
sum+=date[i-1];
}
}
switch ((sum+4)%7)
{
case 1:cout << "Monday";break;
case 2:cout << "Tuesday";break;
case 3:cout << "Wednesday";break;
case 4:cout << "Thursday";break...
登录后发布评论
暂无评论,来抢沙发