switch(month)
{case 12:num+=30;
case 11:num+=31;
case 10:num+=30;
case 9:num+=31;
case 8:num+=31;
case 7:num+=30;
case 6:num+=31;
case 5:num+=30;
case 4:num+=31;
case 3:if(j%4==0&&j%100!=0||j%400==0)num+=29;
else num+=28;
case 2:num+=31;
case 1:;
}
举例说明吧,month==4时,会从case 4:开始执行,一直执行到case 1:。