Dim sum As Integer sum = 0 For i = 1 To 1000 If i Mod 47 = 0 Then sum = sum + i End If Next MsgBox(sum)
运行结果:
10857