Dim n As Integer, d As String, m As Integer
For n = 100 To 200 If n Mod 3 <> 0 Then Print n; m = m + 1'定义m,m的初始值为0 If m Mod 10 = 0 Then Print vbCrLf'输出10个数后打印回车键,使得一行以10个数输出 End If End If
Next n
End Sub
Private Sub Command1_Click() Dim n, m As Integer, d As String m = 0 For n = 100 To 300 If n Mod 3 <> 0 Then Print n; m = m + 1 End If If (m Mod 10) = 0 Then Print Chr(13) End If Next n
End Sub