编程求1-99的平方和并输出结果。(328350)
Private Sub Form_Click()
Dim i As Integer, s As Single
For i = 1 To 99
Next i
FontSize = 12
FontBold = True
Print s
End Sub
编程求1到5000之间的能被5整除的前若干个奇数之和,当和大于500时,终止求和,并输出该和
Private Sub Form_Click()
Dim i As Integer, s As Long
FontSize = 14
FontBold = True
If i Mod 2 <> 0 Then s = s + i
If s > 500 Then Exit For
Next i
Print s
End Sub