| ²é¿´: 841 | »Ø¸´: 13 | ||
| ¡¾½±Àø¡¿ ±¾Ìû±»ÆÀ¼Û4´Î£¬×÷ÕßÀÃÐܵËÔö¼Ó½ð±Ò 3 ¸ö | ||
| µ±Ç°Ö÷ÌâÒѾ´æµµ¡£ | ||
| µ±Ç°Ö»ÏÔʾÂú×ãÖ¸¶¨Ìõ¼þµÄ»ØÌû£¬µã»÷ÕâÀï²é¿´±¾»°ÌâµÄËùÓлØÌû | ||
[×ÊÔ´]
¡¾·ÖÏí¡¿ÈÕÆÚµÄ¼ÓÕûÊýÔËËã·ûµÄÖØÔØ
|
||
|
ÏÂÃæÊÇÈÕÆÚ¼ÓÕûÊýµÄÖØÔØ ·ÖÁ½¸öÎļþ£ºÒ»¸öÍ·Îļþ£¬Ò»¸öÔ´Îļþ //1.h #include using namespace std; class Date {int year,month,day; public: Date(int a=0,int b=0,int c=0) {year=a; month=b; day=c; } void out(); Date operator +(int j); }; void Date: ut(){cout<<"the Date is :"< Date Date: perator +(int j){int m,i,n; int d[12]={31,28,31,30,31,30,31,31,30,31,30,31}; cout<<"ÇëÊäÈëÒªÏà¼ÓµÄÌìÊým£º"< cout<<"ÒªÏà¼ÓµÄÌìÊýÊÇ£º"< if(n<=d[month-1]) day=day+m; else for(i=0;i<=11;i++) {i=month-1; n=n-d; if(i<11) month++; else {year++; month=1;} if(d[month-1]>n) { day=n; break;} else continue; i++; } return ; } //1.cpp #include"1.h" void main() {int y,m,d,n; while(1) {cout<<"ÇëÊäÈëÄê·Ý£¬Ô·ݣ¬ºÅÊý£¬×·¼ÓÌìÊý£º"; cin>>y>>m>>d>>n; Date d(y,m,d); Date D; cout<<"ÔʼÈÕÆÚ£º"; d.out(); D=d+n; cout<<"×·¼ÓÌìʹ֮ºóµÄÈÕÆÚ£º"; d.out();} } ´ó¼ÒÒ»Æð·ÖÏíһϣ¬¿ÉÒԵϰ»¹¿ÉÒÔÓÅ»¯Ò»Ï£» |
» ²ÂÄãϲ»¶
0856Çóµ÷¼Á
ÒѾÓÐ13È˻ظ´
0703»¯Ñ§
ÒѾÓÐ11È˻ظ´
329Çóµ÷¼Á
ÒѾÓÐ7È˻ظ´
321Çóµ÷¼Á
ÒѾÓÐ8È˻ظ´
0856²ÄÁÏ»¯¹¤µ÷¼Á ×Ü·Ö330
ÒѾÓÐ12È˻ظ´
309Çóµ÷¼Á
ÒѾÓÐ3È˻ظ´
070300»¯Ñ§354Çóµ÷¼Á
ÒѾÓÐ4È˻ظ´
330·ÖÇóµ÷¼Á
ÒѾÓÐ3È˻ظ´
299Çóµ÷¼Á
ÒѾÓÐ8È˻ظ´
Ò»Ö¾Ô¸±±¾©Àí¹¤´óѧ±¾¿Æ211²ÄÁϹ¤³Ì294Çóµ÷¼Á
ÒѾÓÐ6È˻ظ´
12Â¥2009-07-10 23:42:34
wangen994
ÈÙÓþ°æÖ÷ (ÖøÃûдÊÖ)
- ³ÌÐòÇ¿Ìû: 1
- Ó¦Öú: 0 (Ó×¶ùÔ°)
- ¹ó±ö: 3.348
- ½ð±Ò: 7797.4
- Ìû×Ó: 2007
- ÔÚÏß: 242Сʱ
- ³æºÅ: 649482
3Â¥2009-07-09 08:35:45
magic7004
½ð³æ (Ö°Òµ×÷¼Ò)
- ³ÌÐòÇ¿Ìû: 2
- Ó¦Öú: 0 (Ó×¶ùÔ°)
- ½ð±Ò: 444
- Ìû×Ó: 3278
- ÔÚÏß: 156.2Сʱ
- ³æºÅ: 482895
4Â¥2009-07-09 09:20:10
5Â¥2009-07-09 10:01:52














ut()
»Ø¸´´ËÂ¥
10