哪位大神能帮我用vb做一道计算题啊:累加计算,分别用两种循环语句写:12+32+52+72+.+992

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/08 06:56:18

哪位大神能帮我用vb做一道计算题啊:累加计算,分别用两种循环语句写:12+32+52+72+.+992
哪位大神能帮我用vb做一道计算题啊:累加计算,分别用两种循环语句写:12+32+52+72+.+992

哪位大神能帮我用vb做一道计算题啊:累加计算,分别用两种循环语句写:12+32+52+72+.+992
Private Sub Command1_Click()
Dim i As Integer
Dim Result As Integer

For i = 0 To 49

Result = Result + ((i * 2 + 1) * 10 + 2)

Next
MsgBox Result
End Sub
Private Sub Command2_Click()
Dim i As Integer
Dim Result As Integer

Do While i