Private Sub Command1_Click()Dim i As IntegerDim s As Doubles = 0N = 5 For i = 1 To N s = s + 1 / i Next iPrint sEnd Sub我写在按钮被按下的响应函数中了。N定义为5,运行结果是2.283333333333