文章
13
粉丝
328
获赞
13
访问
139.0k
#include<stdio.h>
int main(){
int m[]={0,30,31,30,31,31,30,31,30},mon,day,week,i,sum=0;
char Eweek[][10]={"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"};//字符数组真的忘完了
scanf("%d",&mon);
scanf("%d",&day);
for(i=5;i<=mon;i++)
sum+=m[i-4];
week=(sum+day-12+4)%7;
printf("%s",Eweek[week]);
return 0;
}
登录后发布评论
暂无评论,来抢沙发