freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

c++計(jì)算器課程設(shè)計(jì)--計(jì)算器程序設(shè)計(jì)-預(yù)覽頁(yè)

 

【正文】 景圖,以增加界面的美觀(guān)性。圖6運(yùn)行結(jié)果圖 數(shù)值計(jì)算功能的實(shí)現(xiàn)具體功能的實(shí)現(xiàn)首先添加成員變量。定義如下:public:CZZDlg(CWnd* pParent = NULL)。 //成員函數(shù),處理輸入的數(shù)據(jù)double num_1,num_2。//判斷小數(shù)點(diǎn)是否被點(diǎn)擊int n。void OnMnuPaste()。實(shí)現(xiàn)代碼如下:小數(shù)點(diǎn)的定義如下:void CZZDlg::OnBd() { // . dian=true。 m_input=m_input*10+put。m_done=false。 for(i=0。 m_input=m_input+m。m_done=false。 opt=false。in。 m_Result=m_input。 } } n++。}void CZZDlg::OnB2() { // 2 Numin()。}void CZZDlg::OnB6() { // 6 Numin()。}void CZZDlg::operate(){ num_1=m_Result。}C++課程設(shè)計(jì)當(dāng)清除鍵CE被單擊時(shí),則對(duì)所有的成員變量進(jìn)行初始化。 UpdateData(false)。 n=0。}void CZZDlg::operate(){ num_1=m_Result。}加號(hào)運(yùn)算的實(shí)現(xiàn)如下:if(yun==1)//判斷執(zhí)行何種運(yùn)算 { m_Result=num_1+num_2。}void CZZDlg::Onpf() { operate()。}void CZZDlg::Onsin() { operate()。}void CZZDlg::Oncos() { operate()。 } else if(yun==7)//根號(hào) { if(num_1=0) { m_Result=0。 } else if(yun==8)//sin { m_Result=sin(num_1*PI/180)。 } else if(yun==10)//cos { m_Result=cos(num_1*PI/180)。Run函數(shù)實(shí)現(xiàn)代碼見(jiàn)附錄1。圖51“34+78=”的運(yùn)行結(jié)果其次,輸入“2*4=”,見(jiàn)結(jié)果圖52所示圖52“2*4=”的運(yùn)行結(jié)果再輸入“9/3=”,見(jiàn)結(jié)果圖53所示圖53“9/3=”的運(yùn)行結(jié)果最后出入25開(kāi)根,見(jiàn)結(jié)果圖54所示:圖53“25開(kāi)根=”的運(yùn)行結(jié)果測(cè)試結(jié)構(gòu)顯示,“計(jì)算器”運(yùn)行基本正常,沒(méi)有發(fā)現(xiàn)明顯的錯(cuò)誤。在課程設(shè)計(jì)中我了解到到對(duì)話(huà)框應(yīng)用程序的編程模式、對(duì)話(huà)框添加背景圖片。這次課程設(shè)計(jì)讓我學(xué)到了很多,不僅鞏固了MFC程序設(shè)計(jì)知識(shí),而且也培養(yǎng)了我的動(dòng)手能力,令我的創(chuàng)造性思維得到拓展。 if(yun==1)//加 { m_Result=num_1+num_2。 } else if(yun==3)//乘 { m_Result=num_1*num_2。 } else if(yun==5)//log { if(num_1=0) { m_Result=0。 } else if(yun==6)//平方 { m_Result=num_1*num_1。 } m_Result=sqrt(num_1)。 } else if(yun==9)//tan { m_Result=tan(num_1*PI/180)。 } opt=false。附錄2:計(jì)算器程序// : header fileif !defined(AFX_ZZDLG_H__70D9D5A9_C97C_488F_8F36_08F210B07A01__INCLUDED_)define AFX_ZZDLG_H__70D9D5A9_C97C_488F_8F36_08F210B07A01__INCLUDED_if _MSC_VER 1000pragma onceendif // _MSC_VER 1000/////////////////////////////////////////////////////////////////////// CZZDlg dialogclass CZZDlg : public CDialog{// Constructionpublic: CZZDlg(CWnd* pParent = NULL)。 //成員函數(shù),處理輸入的數(shù)據(jù) double num_1,num_2。//判斷小數(shù)點(diǎn)是否被點(diǎn)擊 int n。 void OnMnuPaste()。 //}}AFX_DATA // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CZZDlg) protected: virtual void DoDataExchange(CDataExchange* pDX)。 afx_msg void OnPaint()。 afx_msg void OnB2()。 afx_msg void OnB6()。 afx_msg void OnBadd()。 afx_msg void OnBmult()。 afx_msg void Onpf()。 afx_msg void Oncos()。endif/////////////////////////////////////////////////////////////////////////////// CAboutDlg dialog used for App Aboutclass CAboutDlg : public CDialog{public: CAboutDlg()。CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD){ //{{AFX_DATA_INIT(CAboutDlg) //}}AFX_DATA_INIT}void CAboutDlg::DoDataExchange(CDataExchange* pDX){ CDialog::DoDataExchange(pDX)。 //{{AFX_DATA_MAP(CZZDlg) DDX_Text(pDX, IDC_EDIT1, m_Result)。 dian=false。 CMenu* pSysMenu = GetSystemMenu(FALSE)。 pSysMenuAppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu)。 // Set small icon // TODO: Add extra initialization here return TRUE。 } else { CDialog::OnSysCommand(nID, lParam)。 int cyIcon = GetSystemMetrics(SM_CYICON)。 int x = (() cxIcon + 1) / 2。 }}// The system calls this to obtain the cursor to display while the user drags// the minimized window.HCURSOR CZZDlg::OnQueryDragIcon(){ return (HCURSOR) m_hIcon。}void CZZDlg::OnB3() { // TODO: Add your control notification handler code here// 3 Numin()。}void CZZDlg::OnB7() { // TODO: Add your control notification handler code here // 7 Numin()。 n=1。 yun=2。 yun=4。 yun=6。 yun=8。 yun=10。 m_done=false。}void CZZDlg::OnBrun() { // TODO: Add your control notification handler code here //= num_2=m_Result。 UpdateData(false)。 UpdateData(false)。 UpdateData(false)。 UpdateData(false)。 UpdateData(false)。 UpdateData(false)。 n=0。 m_Result=m_input。 } else if(dian==true)//如果小數(shù)點(diǎn)已經(jīng)被按下////////// { m_Result=m_input=。in。 m_Result=m_input。 } } else { if(dian==false)//如果小數(shù)點(diǎn)還沒(méi)有被按下 { m_input=m_input*10+put。m_done=false。i++) { put=put/10。 UpdateData(false)。 }void CZZDlg::operate(){ num_1=m_Result。}// : main header file for the ZZ applicationif !defined(AFX_ZZ_H__D6CCE042_0495_4C65_8B5F_FC1236BFFCEC__INCLUDED_)define AFX_ZZ_H__D6CCE042_0495_4C65_8B5F_FC1236BFFCEC__INCLUDED_if _MSC_VER 1000pragma onceendif // _MSC_VER 1000ifndef __AFXWIN_H__ error include 39。 //}}AFX_VIRTUAL// Implementation //{{AFX_MSG(CZZApp) // NOTE the ClassWizard will add and remove member functions here. // DO NOT EDIT what you see in these blocks of generated code ! //}}AFX_MSG DECLARE_MESSAGE_MAP()}。 // Standard initialization // If you are not using these features and wish to reduce the size // of your final executable, you should remove from the following // the specific initialization routines you do not need.ifdef _AFXDLL Enable3dControls()。dlg。}
點(diǎn)擊復(fù)制文檔內(nèi)容
電大資料相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1