Private Sub Command1_Click()
a = 1
Do
n = n + 1
m = 2 * n - 1
s = s + a * 1 / m
a = -a
Loop Until Abs(1 / m) < 10 ^ -6
pi = 4 * s
Print "pi=" & pi
End Su
Private Sub Command1_Click()
a = 1
Do
n = n + 1
m = 2 * n - 1
s = s + a * 1 / m
a = -a
Loop Until Abs(1 / m) < 10 ^ -6
pi = 4 * s
Print "pi=" & pi
End Su