编写程序,求在3000以内能被17或者23整除的正整数的个数
问题描述:
编写程序,求在3000以内能被17或者23整除的正整数的个数
答
Private Sub Command1_Click()
Dim i As Integer,n As Integer
For i = 1 To 3000
If i Mod 17 = 0 Or i Mod 23 = 0 Then _
n = n + 1
Next
Print n
End Sub