CS1030 -- Lab 3: Estimating Pi

Spring 2005
Objectives Addressed
Procedures

Write a program that will estimate pi by generating pairs of random numbers between zero and one. You may find it useful to use the equation for the area of a circle when making your estimate.

You should estimate pi using the random number generator found in the cstdlib library.

In addition, you should produce an output file that will allow you to easily import into Excel and plot the points generated by your program.

Lab submission (due at the end of lab)

Before you leave lab, you should submit your source code file(s) and .csv output file. If you have more than two files to submit, you should zip them all into one file and submit the one file. In addition, you should show your Excel plot to your instructor. If you do not complete the assignment during lab, you should submit a screen shot of your graph with the other files.

Acknowledgment

This laboratory assignment was developed by Dr. Chris Taylor.

Last Updated: Thursday, 01-Jan-2015 13:31:15 CST