Discussion 10-27

More with random numbers

Today we did a more complicated example using random numbers: computePi.cpp. See the comments for specifics. Takeaways were:

Google searches

No fancy google searches for you guys today! We didn't really do new material - we just practiced with commands we already knew.

If you want to read about other ways to approximate pi, you could check out this Wikipedia article. Our method from today is included under "Summing a circle's area", but the article also explains the fancy methods that computers actually use.