在窗体上画一个名称为Text1的文本框和一个名称为Command1的命令按钮,然后编写如下事件过程:Private Sub Command1_Click()Dim i As Integer, n As IntegerFor i = 0 To 50i = i + 5n = n + 1If i > 30 Then Exit ForNextText1.Text = Str(n)End Sub程序运行后,单击命令按钮,在文本框中显示的值是______。
查看答案
设有如下程序段:x = 2For i = 1 To 20 Step 3x = x + iNext i运行以上程序后,x的值是______。
执行以下程序段a$= "Abcdefghijk"For i = 6 To 2 Step -2y = Mid(a, i, i)x = Left(a, i)z = Right(a, i)z = UCase(x & y & z)Next iPrint z
有下面程序代码:Private Sub Command1_Click()Dim Sign As IntegerSign = 1a = 2b = 3For k = 1 To 5c = a+ Sign * ba = bb = cPrint c;Sign = -SignNext kEnd Sub
程序运行后,单击窗体,在输入对话框中依次输入25、26、35、45,输出结果为______。Private Sub Form_Click()x = 50For i = 1 To 4y = InputBox("请输入一个整数")y = Val(y)If y Mod 5 = 0 Thena = a + yx = yElsea = a + xEnd IfNext iPrint aEnd Sub