引用 | 编辑
Chiunyao
2005-01-19 10:47 |
楼主
▼ |
||
x4
万年历 可任意输入年份然后把12个越的月历都印出来#include<iostream.h> #include<iomanip.h> int countdays(int year) //计算2000.1.1到2004.1.1日的天数 { int flag,yeardays; int alldays=0; for(int i=1980;i<year;i++) { if(!(i%400)) flag=1; else if(!(i%4)&&i%100) flag=1; else flag=0; if(flag) yeardays=366; else yeardays=365; alldays+=yeardays; } return alldays; } int monthdays(int year,int month) //计算任一年每月的天数 { int flag,days; switch(month){ case 1: case 3: case 5: case 7: case .. 访客只能看到部份内容,免费 加入会员 x1
|
引用 | 编辑
s90304a123
2010-11-08 13:42 |
7楼
▲ ▼ |
大大都用哪种编译器?
我用dev编译都失败... x0 |
引用 | 编辑
williamyii77
2010-12-01 21:37 |
11楼
▲ |
系咪正日历
我正个好好的日历 比你地先 x0 |