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

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/16 11:25:34
哪位大神能帮我用vb做一道计算题啊:累加计算,分别用两种循环语句写:12+32+52+72+.+992
x){:yՓO,tދOw{1eIOg=qu rьS|] :O;ڞvcOz޷O>m TmhmlmjmnmiidT? o2KRKssR s254 %3W!SX3$5=E"(4,_o``b  Z F@&ahdihsR+Jt A`Q׼qyو^vWIb_\gf%B

哪位大神能帮我用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