ImageVerifierCode 换一换
格式:DOCX , 页数:20 ,大小:21.11KB ,
资源ID:19198659      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/19198659.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(大学VB程序设计课后习题参考答案编码Word文档下载推荐.docx)为本站会员(b****5)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

大学VB程序设计课后习题参考答案编码Word文档下载推荐.docx

1、FontBold = True欢迎来到河南大学Private Sub Command3_Click()End2-10r = Text1.TextText2.Text = 3.14 * 2 * rText1.Text = Text2.Text = Text1.SetFocus2-11Private Sub Form_Load()河南大学欢迎您!Text1.FontName = Text1.FontSize = 50Text1.BackColor = vbYellowText1.ForeColor = vbBlue2-12Dim s As Strings = Text1.SelTextText2.

2、SelText = s2-13If Label1.Top -Label1.Height ThenLabel1.Top = Label1.Top - 100Label1.Top = Form1.Height3-2Dim n As IntegerRandomizen = Int(90 * Rnd) + 10)Print n3-3河南大学环境与规划学院FontSize = Int(71 * Rnd + 10)3-4n = Text1.TextText2.Text = Hex(Asc(Right(Text1.Text, 1)3-5Dim m As Datem = Text1.Textn = DateT

3、ext2.Text = n - m3-6Dim b As StringDim n As StringDim m As Stringm = Left(Text1, 1)n = Right(Text1, 1)b = Mid(Text1, 2, 1)Text2.Text = n & b & m3-7Private Sub Form_click()r = InputBox(请输入字符)Print Left(r, 1) & Mid(r, 3, 1) & Right(r, 1)3-8Label1.FontSize = Rnd * 40 + 10Label1.BackColor = RGB(Rnd * 25

4、6, Rnd * 256, Rnd * 256)Label1.ForeColor = QBColor(Int(16 * Rnd)3-9x = Shell(notepad.exe, 1)Shell mspaint.exe, 13-10r! = InputBox(请输入您的工资:a = r 100b = (r - 100 * a) 50c = (r - 100 * a - b * 50) 10d = (r - 100 * a - b * 50 - c * 10) 5e = (r - 100 * a - b * 50 - c * 10 - d * 5) 2f = r - 100 * a - b *

5、50 - c * 10 - d * 5 - e * 2您的工资是: & r100元张数: a50元张数: b10元张数: c5元张数: d2元张数: e1元张数: f4-1Dim p As Single, r As Single, n As Singlep = Text1r = Text2n = Text3s = p * (1 + r) nMsgBox 您的本息是: Round(s, 2)4-2Dim max As Single, min As Singlea!请输入第一个实数b!请输入第二个实数If a b ThenPrint a, bPrint b, aEnd If 4-3请输入年份If

6、a Mod 4 = 0 And a Mod 100 0 & a Mod 400 = 0 Then您刚刚输入的年份为闰年!您刚刚输入的年份不是闰年!4-4a=b=c!c=d! = b * b - 4 * a * cIf d = 0 Thenm! = (-b + Sqr(d) / (2 * a)n! = (-b - Sqr(d) / (2 * a) X1 = ; m, , X2= nr = (-b) / (2 * a)i = Sqr(Abs(-d) / (2 * a)X1 = r &+ Abs(i) &iX2 = -4-5Dim x!x = Text1If x 60 ThenText2 = 重考!

7、ElseIf x 70 Then及格! 80 Then中等! 90 Then良好!优秀!Text1 = 4-6Select Case xCase Is 60 70 80 90Case ElseEnd Select4-7s = InputBox(请输入年龄If s 30 Then您的年龄为 s, 请参加长跑运动ElseIf s 100 1-2+3-4+5-6+99-100= s4-12Dim m As Integerm% = InputBox(请输入正整数m(m=1)阶乘n% = InputBox(请输入正整数n(n=m)For m = m To nt = 1For i = 1 To mt =

8、t * iNext is = s + tNext m m!+(m+1)!+n!=4-13Dim a%Dim b%Dim c%For a = 1 To 20For b = 1 To 20For c = 1 To 20If a * a + b * b = c * c ThenPrint a, b, cNext cNext bNext a4-14For n = 1 To 500For i = 1 To n - 1If n Mod i = 0 Then s = s + iIf s = n Then Print i;s = 04-15Dim i As IntegerDim n As Longn = 1D

9、o While t 0.00001e = e + ti = i + 1n = n * it = 1 / nLoope的近似值是5-2Dim i%, ss = Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)For i = 0 To 9If s(i) Mod 3 = 0 ThenPrint s(i); i5-3Option Base 1Dim x()x = Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)t = x(1)For i = 1 To 9x(i) = x(i + 1)Print x(i);Nextx(10) = tPrint x(i)t

10、= x(10)For i = 9 To 1 Step -1x(i + 1) = x(i)x(1) = tFor i = 1 To 105-4Dim a(5, 5)For i = 1 To 5Sum = 0For j = 1 To 5a(i, j) = Int(Rnd * 51 + 10)Sum = Sum + a(i, j)Print a(i, j);Next jPrint SumIf i = j Then Print a(i, j);5-5Dim a() As IntegerDim Max As Integer, iMax As Integer, jMax As IntegerDim Min

11、 As Integer, iMin As Integer, jMin As IntegerM = InputBox(输入MN = InputBox(输入NReDim a(M, N)For i = 1 To MFor j = 1 To Na(i, j) = Int(Rnd * 900) + 100Max = a(1, 1): Min = a(1, 1)If a(i, j) Max Then Max = a(i, j): iMax = i: jMax = jf a(i, j) Min Then Min = a(i, j): iMin = i: jMin = jMax= Max, iMax= iMa

12、x, jMax= jMaxMin= Min, iMin= iMin, jMin= jMinErase a 5-6n = InputBox(nReDim a(n, n)For i = 1 To nFor j = 1 To nIf i = j Thena(i, j) = 1a(i, j) = 0Erase a5-7Dim x As VariantFor i = 1 To 7x(i) = x(i + 3)ReDim Preserve x(i)x = Array(1, 2, 3, 4, 5, 6, 7)or i = 1 To 75-8Private Sub Command1_Click(Index A

13、s Integer)Select Case IndexCase 1Text3 = Val(Text1) + Val(Text2)Case 2Text3 = Text1 - Text2Case 3Text3 = Text1 * Text2Case 4Text3 = Text1 / Text26-1Dim x As SingleDim y As SingleDim z As Singlex = InputBox(请输入圆柱体的半径y = InputBox(请输入圆柱体的高度volume x, y, z圆柱体的体积为 z6-2窗体模块Dim a!, b!, c!a = InputBox(b = In

14、putBox(c = volume(a, b)标准模块Function volume(r As Single, h As Single) As Singlevolume = 3.14 * r * r * hEnd Function6-3Dim y%请输入一个整数Call week(y)6-4Dim a As Integer, b As Stringb = week(a)Print bFunction week(s As Integer) As StringSelect Case sCase 0week = 星期日星期一星期二星期三星期四Case 5星期五Case 6星期六数据无效6-5Private Sub Form_cl

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1