vf计算1~100所有能被3或4整除的数的和
问题描述:
vf计算1~100所有能被3或4整除的数的和
答
Private Sub Command1_Click()
Dim i As Integer,s As Long
For i = 1 To 100
If i Mod 3 = 0 Or i Mod 4 = 0 Then
s = s + i
End If
Next i
Print s
End Sub