VB编程 1-100中被3整除数的累加和

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/08 09:35:31

VB编程 1-100中被3整除数的累加和
VB编程 1-100中被3整除数的累加和

VB编程 1-100中被3整除数的累加和
Private Sub Form_Click()
Dim i As Integer, sum As Integer
For i = 1 To 100
If i Mod 3 = 0 Then sum = sum + i
Next
Print sum
End Sub