1.Function F(a As Integer)
Dim b As Integer
Static c As Integer
b = b + 3
c = c + 3
F = a + b + c
End Function
Private Sub Command1_Click()
Dim a As Integer
a = 5
For i = 1 To 3
Print F(a)
Next i
End Sub
写出程序运行时,单击命令按钮在窗体上的输出结果。
2.读程序
Private Sub Form_Click()
Dim x As Integer
Static y As Integer
x = x + 5
y = x + y
Form1.Print "x="; x, "y="; y
End Sub
写出程序运行时连续单击三次窗体后,Form1上的输出结果。
3.读程序
Private Sub Command1_Click()
Dim n As Integer, y As Integer, x As Integer
a = 1
Do While a < 8
n = n + 1
b = b + 2
a = a * (a + 1)
Loop
Text1.Text = n
Text2.Text = a
Text3.Text = b
End Sub
写出程序运行时单击Command1后,文件框Text1、 Text2和 Text3的输出结果。
- - 我要过程 看不懂 我不要答案