我这个代码到底哪里错了呢?
include <stdio.h>
int main()
{
int year = 2008;
int month = 8;
int day = 8;
switch(day)
{
case 1 : day+=31; break;
case 2:
if(2008%400==0||2008%4==0&&2008%100!=0)
{
day+=29;
else
day+=28;
}
case 3 : day+=31; break;
case 4 : day+=30; break;
case 5 : day+=31; break;
case 6 : day+=30; break;
case 7 : day+=31; break;
case 8 : day+=31; break;
case 9 : day+=30; break;
case 10 :day+=31; break;
case 11: day+=30; break;
case 12: day+=31; break;}
printf("2008年8月8日是第%d天");
慕婉清5044891
望远
望远
相关分类