Private Sub Command1_Click()
Static x As Integer
For i=1 To 2
y=y+x
x=x+2
Next
Print x,y
End Sub
程序运行后,连续三次单击Command1按钮后,窗体上最后一次的结果是
5、在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click()
Dim x As Integer
Do
X=x+1
s=s+x
x=(x+2)*x
loop until x>15
print “s=”;s,“x=”;x
End Sub
程序运行后的结果是 。
6、在窗体上画一个命令按钮,然后编写如下程序:
private sub command1_click()
dim i as integer
for I=0.5 to 8.5 step 2.5
s=s+I*10
next I
print s,I
end sub
程序运行后,单击命令按钮,在窗体上的的输出结果为 。
7、以下程序运行后,单击窗体,输出结果是
Private Sub form_click()
Dim m As Integer
Dim n As Integer
m = 3: n = 5
Print m, n, test(m, n)
End Sub