这个程序中天数定义
#include <stdio.h>
int main()
{
int sum; //这里改成int sum; 结果就出错了 求解??????
int month=8;
switch(month)
{
case 12:sum+=30;
case 11:sum+=31;
case 10:sum+=30;
case 9:sum+=31;
case 8:sum+=31;
case 7:sum+=30;
case 6:sum+=31;
case 5:sum+=30;
case 4:sum+=31;
break;
}
printf("%d\n",sum);
return 0;
}