# MonteCarlo Project Solution

For this assignment you will turn in:

In class(10pts):

1.       A statement of the problem (typed)

2.       An explanation of your solution (typed)

3.       A flowchart (hand-drawn or computer generated)

4.       Pseudocode (typed)

Via BlackBoard(40pts):

1.       C program named <username_monte_carlo.c

Assignment:

Follow the steps that we have outlined in class for algorithm development to generate a program that estimates the value of π using a Monte Carlo simulation. See the following website for some additional details: http://polymer.bu.edu/java/java/montepi/MontePi.html

Specifications:

Functions:

1.  void getRandomXY(*float x, *float y)

a.       gives a random (x,y) pair

2.  int insideCircle(float x, float y)

a.       returns whether the point is inside the circle (0-false, 1-true)

*  This is the minimum functions that you must use. You may use others if you like. Outputs:

1.       Your estimated value of π

Other:

1.       This is individual work. You may NOT work in groups.

2.       Please staple all work together.

3.       You are expected to error check.

4.       For code: No compile = No points, no exceptions!

5.       Start Early! This will take some research: Monte Carlo Method, using Random variables, etc.