[填空题] 下列过程的功能是:用来计算并输出S = 1+1/2+1/3+…+1/100的值。请完善程序。 Function SumF(n As Integer)As Single s = 0 F
22 查阅
[填空题] 下列过程的功能是:用来计算并输出S = 1+1/2+1/3+…+1/100的值。请完善程序。
Function SumF(n As Integer)As Single
s = 0
For i = 1 To n
s = ______
Next i
SumF = s
End Function
Private Sub Form_Click( )
Sum1 = SumF(100)
Print "sum1 = "; sum1
End Sub
参考答案: