已知s=1+2+3+...+n,找出最大的n,使得S
问题描述:
已知s=1+2+3+...+n,找出最大的n,使得S
答
Private Sub Command1_Click()
Dim s, n As Long
n = 1
Do While s s = s + n
n = n + 1
Loop
Print (n)
End Sub