VB编程计算0-100间的奇数和急

来源:学生作业帮助网 编辑:六六作业网 时间:2025/01/31 07:26:25
VB编程计算0-100间的奇数和急VB编程计算0-100间的奇数和急VB编程计算0-100间的奇数和急PrivateSubiTest()Dims%,i%,ms$Fori=1To100IfiMod2=1

VB编程计算0-100间的奇数和急
VB编程计算0-100间的奇数和

VB编程计算0-100间的奇数和急
Private Sub iTest()
Dim s%,i%,ms$
For i = 1 To 100
If i Mod 2 = 1 Then
s = s + i
ms = ms & vbTab & i
Next i
' Print "0-100间的奇数和为:" & s
MsgBox "0-100间的奇数和为:" & s & vbCrLf & ms
End Sub