如题所述
完整的代码如下:
Dim Pi As Single
Dim i As Single
Dim Fh As Integer
Fh = -1
Pi = 0
For i = 1 To 1000000
Fh = -1 * Fh
Pi = Pi + Fh / (2 * i - 1)
Next i
Pi = Pi * 4
Print Pi