我的代码没有错啊而且也能够正常运行结果也是221怎么我提交的是时候显示有问题呢
#include <stdio.h>
int main()
{
/* 定义需要计算的日期 */
int year = 2008;
int month = 8;
int day = 8;
int sum,num,kum;
if(year%4==0&&year%100!=0||year%400==0)
{
num=29;
}
else
{
num=28;
}
switch(month)
{
case 1:kum=0; break;
case 2:kum=31; break;
case 3:kum=31+num; break;
case 4:kum=62+num; break;
case 5:kum=92+num; break;
case 6:kum=123+num; break;
case 7:kum=153+num; break;
case 8:kum=184+num; break;
case 9:kum=215+num; break;
case 10:kum=245+num;break;
case 11:kum=276+num;break;
case 12:kum=306+num;break;
default:printf("一年只有12个月哟\n"); break;
}
sum=kum+day;
printf("%d年%d月%d日是第%d天",year,month,day,sum);
return 0;
}
该年的第……
输出结果要完全一致才能通过吧
哦哦,O(∩_∩)O谢谢