vb求s=1+(1+2)+(1+2+3)+(1+2+3+4)+...+(1+2+3+4+n)用 20
vb求s=1+(1+2)+(1+2+3)+(1+2+3+4)+...+(1+2+3+4+n)用(响应)求s=1+(1+2)+(1+2+3)+(1+2+3+4)+...+(...
vb求s=1+(1+2)+(1+2+3)+(1+2+3+4)+...+(1+2+3+4+n)用(响应)求s=1+(1+2)+(1+2+3)+(1+2+3+4)+...+(1+2+3+4+n)用until求多项式,直到和大于5000将结果存入变量s中
展开
展开全部
Private Sub CommandButton1_Click()
Dim i, sumi, s As Integer
i = 1
s = 0
sumi = 1
Do
i = i + 1
sumi = sumi + i
s = s + sumi
Loop Until s > 5000
TextBox1.Text = "前" & i & "项的和=" & s
End Sub
Dim i, sumi, s As Integer
i = 1
s = 0
sumi = 1
Do
i = i + 1
sumi = sumi + i
s = s + sumi
Loop Until s > 5000
TextBox1.Text = "前" & i & "项的和=" & s
End Sub
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询