![2022年vb科學(xué)計算器實驗報告_第1頁](http://file4.renrendoc.com/view/55be5463a98b0347a7a9e79a0c123275/55be5463a98b0347a7a9e79a0c1232751.gif)
![2022年vb科學(xué)計算器實驗報告_第2頁](http://file4.renrendoc.com/view/55be5463a98b0347a7a9e79a0c123275/55be5463a98b0347a7a9e79a0c1232752.gif)
![2022年vb科學(xué)計算器實驗報告_第3頁](http://file4.renrendoc.com/view/55be5463a98b0347a7a9e79a0c123275/55be5463a98b0347a7a9e79a0c1232753.gif)
![2022年vb科學(xué)計算器實驗報告_第4頁](http://file4.renrendoc.com/view/55be5463a98b0347a7a9e79a0c123275/55be5463a98b0347a7a9e79a0c1232754.gif)
![2022年vb科學(xué)計算器實驗報告_第5頁](http://file4.renrendoc.com/view/55be5463a98b0347a7a9e79a0c123275/55be5463a98b0347a7a9e79a0c1232755.gif)
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、 西安科技大學(xué)可視化編程語言實驗報告題目: 科學(xué)計算器 班級: 學(xué)號: 姓名: 11月復(fù)雜型科學(xué)計算器旳設(shè)計與實現(xiàn)實驗?zāi)繒A1通過本實驗,進一步理解Visual Basic旳編程措施。2提高運用Visual Basic編程旳能力。3培養(yǎng)對所學(xué)知識旳綜合運用能力。實驗類型綜合型。實驗內(nèi)容與環(huán)節(jié)一.界面設(shè)計。對象屬性設(shè)立對象名屬性值Form1Caption科學(xué)計算器Command1CaptionSinindex0Command1Captioncosindex1Command1Captiontgindex2Command1Captionsecindex3Command1Captioncscindex4
2、Command1Captionctgindex5Command1CaptionSqrindex6Command1Caption1/aindex7Command1Captionarctgindex8Command1Captionarcctgindex9Command1Captionlogindex10Command1Captionlnindex11Command1Captionshindex12Command1Captionchindex13Command1Captionabsindex14Command2Caption0index0Command2Caption1index1Command2C
3、aption2index2Command2Caption3index3Command2Caption4index4Command2Caption5index5Command2Caption6index6Command2Caption7index7Command2Caption8index8Command2Caption9index9Command2Caption-index10Command2Caption.index11Command2Caption+index12Command2Caption-index13Command2Caption*index14Command2Caption/in
4、dex15Command2Caption(index16Command2Caption)index17Command2Captionindex18Command3Caption-Command4CaptionCECommand5Caption=二計算器界面:三程序代碼:Dim num1 As Single, num2 As SingleDim fu As IntegerDim sign As IntegerPrivate Sub Command1_Click(Index As Integer)Select Case Index Case 0 To 9 sign = Index + 20 Cas
5、e 10 sign = Index + 20 fu = 1 Case 11 To 14 sign = Index + 20End SelectText1.Text = End SubPrivate Sub Command2_Click(Index As Integer) Select Case Index Case 0 To 9 Text1.Text = Text1.Text & Index If fu = 0 Then num1 = Val(Text1.Text) Else num2 = Val(Text1.Text) End If Case 10 Text1.Text = Text1.Te
6、xt & - Case 11 Text1.Text = Text1.Text & . Case 12 To 18 Text1.Text = sign = Index fu = 1 End SelectEnd SubPrivate Sub Command3_Click()If text1.text=” thenelseText1.Text = Left$(Text1.Text, Len(Text1.Text) - 1)End if End SubPrivate Sub Command4_Click()Text1.Text = End SubPrivate Sub Command5_Click()
7、Dim n As Integer, cf As Singlefu = 0: cf = 1Select Case sign Case 12 Text1.Text = num1 & + & num2 Text1.Text = num1 + num2 Case 13 Text1.Text = num1 - num2 Case 14 Text1.Text = num1 * num2 Case 15 Text1.Text = num1 / num2 Case 18 For n = 1 To num2 cf = cf * num1 Next n Text1.Text = cf Case 20 Text1.
8、Text = Sin(num1) Case 21 Text1.Text = Cos(num1) Case 22 Text1.Text = Tan(num1) Case 23 Text1.Text = 1 / Cos(num1) Case 24 Text1.Text = 1 / Sin(num1) Case 25 Text1.Text = 1 / Tan(num1) Case 26 Text1.Text = Sqr(num1) Case 27 Text1.Text = 1 / num1 Case 28 Text1.Text = Atn(num1) Case 29 Text1.Text = Atn(num1) + 2 * Atn(1) Case 30 Text1.Text = Log(num2) / Log(num1) Case 31 Text1.Text = Log(num1) Case 32 Text1.Text = (Exp(num1)
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 蘇教版一年級數(shù)學(xué)下冊期末復(fù)習(xí)口算練習(xí)題一
- 八年級數(shù)學(xué)下冊22.3特殊的平行四邊形5矩形和菱形聽評課記錄滬教版五四制
- 五年級德育工作計劃
- 蘇教版二年級數(shù)學(xué)上冊期末復(fù)習(xí)口算練習(xí)題
- 企業(yè)人力資源管理咨詢項目合同范本
- 車棚搭建協(xié)議書范本
- 簽訂銷售合同范本
- 新建房屋租賃合同范本
- 2025年度餐飲商鋪品牌推廣租賃合同
- 二零二五年度離婚協(xié)議書凈身出戶模板:婚姻終結(jié)財產(chǎn)分割規(guī)范
- 事業(yè)單位公開招聘工作人員考試題(公共基礎(chǔ)知識試題和答案)
- 低空飛行旅游觀光項目可行性實施報告
- 2024年版:煤礦用壓力罐設(shè)計與安裝合同
- 甲狀腺的科普宣教
- 《算法定價壟斷屬性問題研究的國內(nèi)外文獻綜述》4200字
- 2024年04月浙江義烏農(nóng)商銀行春季招考筆試歷年參考題庫附帶答案詳解
- 涉密計算機保密培訓(xùn)
- 2024年浙江省五校聯(lián)盟高考地理聯(lián)考試卷(3月份)
- 在線心理健康咨詢行業(yè)現(xiàn)狀分析及未來三至五年行業(yè)發(fā)展報告
- 電動三輪車購銷合同
- 淋巴瘤的免疫靶向治療
評論
0/150
提交評論