哪里有问题,自己看不出来
#include <stdio.h>
int main()
{
/* 定义需要计算的日期 */
int year = 2008;
int month = 8;
int day = 8;
int today = 0;
/*
* 请使用switch语句,if...else语句完成本题
* 如有想看小编思路的,可以点击左侧任务中的“不会了怎么办”
* 小编还是希望大家独立完成哦~
*/
switch(month)
{
case 12: today += 30;
case 11: today += 31;
case 10: today += 30;
case 9: today += 31;
case 8: today += 31;
case 7: today += 30;
case 6: today += 31;
case 5: today += 30;
case 4: today += 31;
case 3:
if(year%4==0&&(year%100!=0||year&400==0))
{
today +=29;
}
else
{
today +=28;
}
case 2: today +=31;
case 1: today =day;
printf("%d年%d月%d日是本年第%d天",year,month,day,today) ;
}
return 0;
}