usingnamespacestd;___(1)___Month(Jan,Feb,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..."/>

深夜成人在线,chinese国产一区二区,欧美精品乱码,日韩欧美在线视频免费观看,国产午夜不卡,日韩av影院在线,五月天婷婷国产精品

軟題庫 移動APP 掃碼下載APP 隨時隨地移動學習 培訓課程
當前位置:信管網 >> 在線考試中心 >> 信息系統項目管理師題庫 >> 試題查看
試卷名稱 2005年上半年程序員考試下午真題試題(案例分析)
考試中心《2005年上半年程序員考試下午真題試題(案例分析)》在線考試
試卷年份2005年上半年
試題題型【分析簡答題】
試題內容

【說明】
下面程序的功能是計算并輸出某年某月的天數。
【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 ,Feb );
Cout << day. ___(5)___ ();
}


相關試題

推薦文章
合作網站內容