在窗体上画一个命令按钮,名称为 Command1, 然后编写如下代码:Option Base 0 Private Sub
在窗体上画一个命令按钮,名称为 Command1, 然后编写如下代码:
Option Base 0
Private Sub Command1_Click()
Dim A (4)As Integer,B(4) As Integer
For k=0 To 2
A(k+1)=InputBox(“ 请输入一个整数 ”)
B(3-k)=A(k+1)
Next k
Print B(k)
End Sub
程序运行后,单击命令按钮,在输入对话框中分别输入2、4、6,输入结果为()。 A.0
B.2
C.3
D.4