引用 | 編輯
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 |