main()
{
int a, b, c, d, e, f, g;
v:printf("请输入年月日:\n");
scanf("%d %d %d", &a, &b, &c);
f = a;e=0;
a = (a % 4 == 0) ? 1 : 0;
for (d = 1; d < b; d++)
switch (d)
{
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:
e += 31;
break;
case 2:
e = e + 28 + a;
break;
case 4:
case 6:
case 9:
case 11:
e += 30;
break;
}
e = (e + c) % 7;
a = f % 4;
b = a % 7;
e = e + b;
f = (e == 8) ? 1 : e;
printf("星期%d\n", f);
goto v;
}