Private Sub Command1_Click() n = InputBox("请输入n:") For i = 1 To n t = 1 / (i * (i + 1)) s = s + t Next i Print "S=" & sEnd Sub