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.
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.
This laboratory assignment was developed by Dr. Chris Taylor.
© 2001-2006 Dr. Christopher C. Taylor | Office: CC-36C | Phone: 277-7339 |