文章
25
粉丝
364
获赞
8
访问
219.0k
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
char *week[7] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
int days[12] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
int main()
{
int month, day, sum;
scanf("%d%d", &month, &day);
sum=day-12+4;
for (int i = 0; i < month - 4; i++)
{
sum += days[i+3];
}
printf("%s", week[sum % 7]);
//system("pause");
return 0;
}
登录后发布评论
暂无评论,来抢沙发