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