- 0
- 0
- 约1.58千字
- 约 5页
- 2016-10-16 发布于重庆
- 举报
VB程序設计教程第三版泷沛曾等著实验B答案
VB程序设计教程 第三版 泷沛曾等著
实验B 答案
第一题Private Sub Command1_Click()Dim f!, c!f = Val(Text1)c = 5 / 9 * (f - 32)Text2 = Format(c, 0.00)End Sub
Private Sub Command2_Click()Dim c!, f!c = Val(Text2)f = 9 / 5 * c + 32Text1 = Format(f, 0.00)End Sub
?
第二题Private Sub Command1_Click()Dim r!, s!r = Val(Text1)s = 3.14 * r ^ 2Label2 = Format(s, 0.00)
End Sub
Private Sub Command2_Click()Dim r!, d!r = Val(Text1)d = 2 * r * 3.14Label3 = Format(d, 0.00)
End Sub
Private Sub Text1_lostfocus()If Not IsNumeric(Text1) ThenText1 = MsgBox(输入有非数字字符,请重新输入)Text1.SetFocusEnd IfEnd Sub
第四题??
Private Sub Command1_Click()Text1.Text = UCase(Text1)Label1 = Len(Text1)End Sub
?
Private Sub Text1_lostfocus()If IsNumeric(Text1) ThenText1 = MsgBox(输入有非字母字符,请重新输入)Text1.SetFocusEnd IfEnd Sub第五题???
?
Private Sub Form_Click()RandomizeDim a As Integer, b As Integer, c As Integer, d As Integerd = Int(Rnd * 900 + 100)Print da = d \ 100b = (d / 10) Mod 10c = d Mod 10
Print c b aEnd Sub
?
第6题
Private Sub Form_click()label1=left(text1,3)
label2=mid(text1,4,4)
label3=right(text1,3)
end sub第8 题?Private Sub Form_click()Dim a!, b!, c!, d!, e!a = Val(InputBox(输入实数))b = a ^ 2c = Sqr(a)d = a ^ 3e = a ^ (1 / 3)Print 平方; Format(b, 0.000); 平方根; Format(c, 0.000); 立方; Format(d, 0.000); 立方根; Format(e, 0.000)
End Sub
您可能关注的文档
- Unity3D游戲引擎最详尽基础教程.docx
- USB無线网卡加工制作教程.doc
- unix培訓教程.doc
- UT165量產教程.doc
- USB采集卡遠程监控教程.doc
- usaco教程翻譯.doc
- ut163主控量產工具教程(本人验证有效后加工编辑).doc
- Unity3D入門中文教程.doc
- utorrent設置教程.docx
- Uxiksw社交禮仪教程辅导.doc
- 小区绿化施工协议书.docx
- 墙面施工协议书.docx
- 1 古诗二首(课件)--2025-2026学年统编版语文二年级下册.pptx
- (2026春新版)部编版八年级道德与法治下册《3.1《公民基本权利》PPT课件.pptx
- (2026春新版)部编版八年级道德与法治下册《4.3《依法履行义务》PPT课件.pptx
- (2026春新版)部编版八年级道德与法治下册《6.2《按劳分配为主体、多种分配方式并存》PPT课件.pptx
- (2026春新版)部编版八年级道德与法治下册《6.1《公有制为主体、多种所有制经济共同发展》PPT课件.pptx
- 初三教学管理交流发言稿.docx
- 小学生课外阅读总结.docx
- 餐饮门店夜经济运营的社会责任报告(夜间贡献)撰写流程试题库及答案.doc
原创力文档

文档评论(0)