![](zzz/editor/img/code.gif)
程序代码:
Private Sub Form_Load() '运行时将窗体的Autoredraw属性设置为true,结果是7
Dim n As Long, i As Integer, j As Integer 'Integer不够大,改为long就OK
n = 1
For i = 1 To 100
For j = 1 To i
n = n * j
Next j
If (n > 20000) Then Exit For
n = 1
Next i
Print i - 1 'i-1就是要求的数
End Sub