VisualBasicDotNet程序设计教程第2版课后实验题.docx

VisualBasicDotNet程序设计教程第2版课后实验题.docx

  1. 1、本文档共7页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
VisualBasicDotNet程序设计教程第2版课后实验题

实验四 第二题 Public Class Form1 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click TextBox1.Font = New Font(幼圆, 15) Dim i As Integer For i = 1 To 9 TextBox1.Text = Space(i - 1) StrDup(18 - 2 * i, Chr(64 + i)) vbCrLf Next i End Sub End Class 第四题 Public Class Form1 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click L1.Font = New Font(幼圆, 15) Dim s As Single Dim a As Integer, n As Integer n = 1 a = 1 s = s + 1 / a Do a = a + n s = s + 1 / a n = n + 1 Loop While (1 / a 0.00001) L1.Text = Do While结构结果 s n 项 End Sub Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click L2.Font = New Font(幼圆, 15) Dim a As Integer Dim i As Integer Dim s As Single Dim n As Integer s = 0 n = 0 a = 1 For i = 1 To 448 s = s + 1 / a a = a + i n = n + 1 Next i L2.Text = For结构结果 s n 项 End Sub End Class 第七题 窗体1 (横向显示) Public Class Form1 Dim a%, n% Private Sub HScrollBar1_Scroll(sender As Object, e As ScrollEventArgs) Handles HScrollBar1.Scroll L1.Font = New Font(宋体, 10) L1.Text = a = Space(1) HScrollBar1.Value End Sub Private Sub HScrollBar2_Scroll(sender As Object, e As ScrollEventArgs) Handles HScrollBar2.Scroll L2.Font = New Font(宋体, 10) L2.Text = n = Space(1) HScrollBar2.Value End Sub Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click a = HScrollBar1.Value n = HScrollBar2.Value Dim i, temp, sum As Integer Dim s As String temp = 0 sum = 0 s = For i = 1 To n temp = temp * 10 + a sum = sum + temp s = s + Str

文档评论(0)

haihang2017 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档