一
Private Sub Command1_Click()
Dim i As Integer, j As Integer
j = 0
For i = 1 To 1000
If i Mod 11 = 0 Then
j = j + 1
Print i;
If j Mod 11 = 0 Then Print
End If
Next i
Print
Print "Ò»¹²ÓÐ" & j & "¸öÊý¿ÉÒÔ±»11Õû³ý"
End Sub
和
二
Private Sub Command1_Click()
Dim i As Integer, j As Integer
j = 0
For i = 1 To 1000
If i Mod 11 = 0 Then
j = j + 1
Print i;
If j Mod 11 = 0 Then
Print
End If
Next i
Print
Print "Ò»¹²ÓÐ" & j & "¸öÊý¿ÉÒÔ±»11Õû³ý"
End Sub
为什么PRINT的位置变一下第2个程序就错了!
Private Sub Command1_Click()
Dim i As Integer, j As Integer
j = 0
For i = 1 To 1000
If i Mod 11 = 0 Then
j = j + 1
Print i;
If j Mod 11 = 0 Then Print
End If
Next i
Print "Ò»¹²ÓÐ" & j & "¸öÊý¿ÉÒÔ±»11Õû³ý"
End Sub
和
二
Private Sub Command1_Click()
Dim i As Integer, j As Integer
j = 0
For i = 1 To 1000
If i Mod 11 = 0 Then
j = j + 1
Print i;
If j Mod 11 = 0 Then
End If
Next i
Print "Ò»¹²ÓÐ" & j & "¸öÊý¿ÉÒÔ±»11Õû³ý"
End Sub
为什么PRINT的位置变一下第2个程序就错了!
是一个完整的条件语句,而
If j Mod 11 = 0 Then
Print
End If
才是一个完整的条件语句,那么If i Mod 11 = 0 Then就不完整了。
但如果,你把print换行,那么你的程序就少了一个Endif了,当然错了,楼主多看看书,加强基础