用VB写程序:找出所有小于50的正整数中7的倍数!在线等!

来源:百度知道 编辑:UC知道 时间:2024/06/30 23:43:29

Dim a As Integer
Dim b As Integer
Private Sub Form_Load()
Text1.Text = ""
For a = 0 To 50
b = a Mod 7
If b = 0 Then
Text1.Text = Text1.Text & a & " "
End If
Next
End Sub

Private Sub Form_Load()

For i = 6 To 50
If i Mod 7 = 0 Then
temp = temp & CStr(i) & Chr(32)
End If
Next

Debug.Print temp
End Sub

Private Sub Form_Load()
Dim a As Integer
Dim b As Integer
form1.AutoRedraw = true
For a = 0 To 50
b = a Mod 7
If b = 0 Then
print a
End If
Next
End Sub