The Monte Carlo Algorithm interprets the probability of a randomized algorithm. Its funnily named after the famous casino in Monte Carlo, Monaco. The basis of estimating pi with this algorithm utilizes concept of a circle inscribed in a square. It interprets the ratio of randomly plotted points inside the circle to overall points plotted within the square. By multiplying this ratio by four (4), we get a very close estimation of the irrational number pi. More knowledge can be found here:
Monte Carlo Algorithm
This program utilizes C++ object-orientated programming in order to estimate pi. The user must input a given number of points within the square. This allows the backend of the Monte Carlo Algorithm to calculate this estimation. Thus giving a result of the estimate of pi, value of pi, and a percent error that is all outputted within the command-line interface.
git clone https://github.com/stevensikorski/estimate-pi.git cd estimate-pi g++ montecarlo.cpp ./a.out