#include <stdio.h>int main() { /* 定义需要计算的日期 */ int year = 2008; int month = 8; int day = 8; int date=0; switch(month) { case 1:date+=31; case 2:if(year%4==0){ date+=29; }else{ date+=28; }; case 3:date+=31; case 4:date+=30; case 5:date+=31; case 6:date+=30; case 7:date+=31; case 8:date+=31; break; } date=date+day; printf("%d年%d月%d日是该年的第%d天",year,month,day,date); return 0;}
3 回答
- 3 回答
- 0 关注
- 1601 浏览
添加回答
举报
0/150
提交
取消