Heres the assigment:
Write a program that approximates the value of pi.
1.Produce a pair of random #s corresponding to the coordinates of a point with in the unit square.
x=random (seed)
y=random(seed)
This is what I was given but I don't know what to do with it:
On graph you have 1/4 of circle of that circle you make a square that surrounds it Kind of like below

1___________________
..................
..................
..................
..................
..................
..................
0___________________________________
..................1



Area of square =1*1=1
Area of fragment circle=(pi)/4
Area of about circle with radius of 1= pi
AS/Ac= number of generated circle point(AS)/#of points in circle(Ac)(start at 0 if in circle AC+1)
Ac= nc*1/n total(assume n total is 10000)
pi=nc*4/n total
All the formulas are confussing me
I know I have to post code for people to start helping me but I hvae none; I don't even no where to start
I really need help.
This post has been edited by NickDMax: 10 March 2010  12:49 PM
Reason for edit:: updated formatting