VB填空2.docxVIP

  • 360
  • 0
  • 约2.3万字
  • 约 42页
  • 2017-01-15 发布于重庆
  • 举报
VB填空2

1、* 使用InputBox函数接收一批字符,将其中的数字字符打印输出。Private Sub Form_Click() Dim s As String, st As String, i As Integer s = InputBox(请输入一个带数字的字符串) For i = 1 To Len(s) st = Mid(s, i, 1) If st = 0 And st = 9 Then Print st; End If Next iEnd Sub2、* 使用双循环实现平行四边形形输出 ********** ********** ********** ********** *********** 程序代码如下: Private Sub Command1_Click() For i = 1 To 5 Print Tab(25 + i ); For j = 1 To 10 Print *; Next j Print Next iEnd Sub3、* 用随机函数产生n个10~99之间的随机整数存入一维数组A,通过键盘输入X,然后在数组中查找。如果找到了,则给出“找到”信息,否则,把这个数X插入到数组中的最后。Private Sub Form_Click() Dim n As Integer, a(100) As Integer Dim x As Integer, i As Inte

文档评论(0)

1亿VIP精品文档

相关文档