usingnamespacestd;___(1)___Month(Jan,F(xiàn)eb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec);classDate{public:Date(intyear,Monthm_month){___(2)___=year;if(m_monthDec)month=Jan;elsemonth=m..."/>

女人久久久www免费人成看片,国内自拍偷拍网,国产一区二区三区免费在线观看,欧美精品三区四区,91久久国产综合久久91,欧美成人精品第一区二区三区 ,美女成人在线观看

軟題庫 移動APP 掃碼下載APP 隨時隨地移動學(xué)習(xí) 培訓(xùn)課程
試卷名稱 2005年上半年程序員考試下午真題試題(案例分析)
考試中心《2005年上半年程序員考試下午真題試題(案例分析)》在線考試
試卷年份2005年上半年
試題題型【分析簡答題】
試題內(nèi)容

【說明】
下面程序的功能是計算并輸出某年某月的天數(shù)。
【C++程序】
#include < iostream>
using namespace std;
___(1)___ Month ( Jan , Feb , Mar , Apr , May , Jun , Jul , Aug , Sep , Oct , Nov , Dec ) ;
class Date {
public:
Date ( int year , Month m_month ) {
___(2)___ = year ;
if ( m_month < Jan || m_month > Dec ) month = Jan;
else month = m_month;
} ;
~Date () {} ;
bool IsLeapYear () {
return ( ( year % 4 = = 0&&year % 100 != 0 ) || year %400 = = 0);
};
int CaculateDays () {
switch ( ___(3)___ ) {
case Feb : {
if ( ___(4)___ ) return 29;
else return 28;
}
case Jan : case Mar : case May : case Jul : case Aug : case : Oct:
case Dec : return 31;
case Apr : case Jun : case Sep : case Nov : return 30;
}
};
private :
int year;
Month month;
};
Void main () {
Date day ( 2000 ,F(xiàn)eb );
Cout << day. ___(5)___ ();
}


相關(guān)試題

推薦文章
合作網(wǎng)站內(nèi)容