下列说法不正确的是( )
Dim a As Integer, b As Integer
a = Val(Text1.Text)
If a Mod 2 = 0 Then
b = a + 1
ElseIf a Mod 3 = 0 Then
b = a + 2
ElseIf a Mod 5 = 0 Then
b = a + 4
Else
b = a
End If
Label1.Caption = Str(b)
运行该程序,在文本框Text1中输入25,单击命令按钮Command1,在标签Label1中显示的是( )
图a
图b
Private Sub Command1_Click()
Dim i As Integer, c As Integer, n As Integer
n = Val(Text1.Text)
c = 0
For i = 1 To n
If i Mod 3 = 0 Then c = c + 1
Next i
Label1.Caption = Str(c)
End Sub
运行该程序,在文本框Text1中输入20,单击命令按钮Command1,在标签Label1中显示的是。
图b