文章
11
粉丝
69
获赞
1
访问
6.6k
#include <stdio.h>
int main()
{
int month,day;
scanf("%d",&month);
scanf("%d",&day);
int days=0;
int d[13]={0,0,0,0,30,31,30,31,31,30,31,30,31};
if(month==4)days=day-12;
else
{
days=day+18;
for(int i=5;i<month;i++)
{
days+=d[i];
}
}
//printf("%d",days);
switch(days%7)
{
case 0:printf("Thursday");break;
case 1:printf("Friday");break;
case 2:printf("Saturday");break;
case 3:printf("Sunday");break;
case 4:printf("Monday");break;
case 5:printf("Tuesday");break;
case 6:printf("Wednesday");break;
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发