Sub Calc()
3 W8 t! ^4 a# k2 [: ^2 [4 n Dim c As Long, j As Long, k As Long, p As Single
! D, }8 f/ j& g( z9 C Dim a As Single
' b4 }) J- v4 \ b Dim b As Single7 {& Y4 x. n, ]7 V* Q1 Z
4 P+ A/ x4 D/ a; O% L c = Val(InputBox("")) 'If c is large enough..., y8 ?3 q# R3 i1 C1 U; L
6 a; y& N$ Q" @0 M
For j = 1 To c' R5 X8 J6 w& K& G1 R
a = Rnd! }: b7 K+ v5 C" W. g, c
b = Rnd. p0 j/ ^1 M9 I' j& y
If a ^ 2 + b ^ 2 <= 1 Then k = k + 1# f: [- v2 J, D' O r" G, r. ~
Next j
/ H7 v; c' B2 z/ L 4 Q# m/ u! N6 O# W! E
p = k / j * 4 'What p is...
3 {/ L5 u1 @! W: y+ y8 r+ A K' bEnd Sub |