Private Sub Form_Click() 点击窗体触发click事件
a = 1 初始a=1
b = a
Do Until a >= 5 执行do循环 直到a大于等于5时退出循环
x = a * b
Print b; x
a = a + b
b = b + a
Loop
end sub
最后窗体上打印的是:
1 1
3 6
Private Sub Form_Click() 点击窗体触发click事件
a = 1 初始a=1
b = a
Do Until a >= 5 执行do循环 直到a大于等于5时退出循环
x = a * b
Print b; x
a = a + b
b = b + a
Loop
end sub
最后窗体上打印的是:
1 1
3 6