怎么星期输出都是-858993456?
#include <stdio.h>void main()
{
int a,b,c,t;
printf("请输入日期,以空格隔开:\n");
scanf("%d %d",&a,&b);
t=c+4;
switch(a)
{
case 1:
c=(b+28*(a-1)-1)%7;
printf("%d月%d日是星期%d\n",a,b,t);
break;
case 2:
c=(b+28*(a-1)+2)%7;
printf("%d月%d日是星期%d\n",a,b,t);
break;
case 3:
c=(b+28*(a-1)+2)%7;
printf("%d月%d日是星期%d\n",a,b,t);
break;
case 4:
c=(b+28*(a-1)+5)%7;
printf("%d月%d日是星期%d\n",a,b,t);
break;
case 5:
c=(b+28*(a-1)+7)%7;
printf("%d月%d日是星期%d\n",a,b,t);
break;
case 6:
c=(b+28*(a-1)+10)%7;
printf("%d月%d日是星期%d\n",a,b,t);
break;
case 7:
c=(b+28*(a-1)+12)%7;
printf("%d月%d日是星期%d\n",a,b,t);
break;
case 8:
c=(b+28*(a-1)+15)%7;
printf("%d月%d日是星期%d\n",a,b,t);
break;
case 9:
c=(b+28*(a-1)+18)%7;
printf("%d月%d日是星期%d\n",a,b,t);
break;
case 10:
c=(b+28*(a-1)+20)%7;
printf("%d月%d日是星期%d\n",a,b,t);
break;
case 11:
c=(b+28*(a-1)+23)%7;
printf("%d月%d日是星期%d\n",a,b,t);
break;
case 12:
c=(b+28*(a-1)+25)%7;
printf("%d月%d日是星期%d\n",a,b,t);
break;
default:printf("您的输入有误!\n");
}
}