Private Sub Command1_Click()
Dim i%
Randomize
For i = 1 To 30
Print Int(Rnd * 100 + 1);
If i Mod 10 = 0 Then Print
Next
End Sub
Private Sub Command2_Click()
Dim i%, n%, m As Boolean
n = Val(InputBox("输入一个正整数吧!"))
Print "正整数:"; n
Do
m = False
For i = 2 To n - 1
If n Mod i = 0 Then m = True: Exit For
Next
If m = False Then Exit Do
n = n + 1
Loop
Print "大于前氏或等于该数伍铅的第一个素数:"腔悔好; n
End Sub