大神能否允许我再问几道题
编程求1--1000之间所有能被7整除之和
编程求1--1000之间是5的倍数的自然数之和
编程求在100--900之间所有能被5除余3,被7除余5的数之和
Private Sub Form_click()
Sum = 0
For i = 1 To 1000
If i Mod 7 = 0 Then
Sum = Sum + i
End If
Next i
Print "1-1000之间能被7整除之和是:" & Sum
Sum = 0
For i = 1 To 1000
If i Mod 5 = 0 Then
Sum = Sum + i
End If
Next i
Print "1-1000之间是5的倍数的自然数之和:" & Sum
Sum = 0
For i = 100 To 1000
If i Mod 5 = 3 And i Mod 7 = 5 Then
Sum = Sum + i
End If
Next i
Print "100-1000之间之间所有能被5除余3,被7除余5的数之和" & Sum
End Sub