A C++ simulation project that uses the Monte Carlo method to estimate probabilities through repeated random experiments.
I built this project to better understand how simulations can be used to estimate mathematical probabilities.
The program runs repeated randomized trials, records the outcomes, and uses the results to approximate probability values. This helped me practice C++ programming, probability concepts, loops, random number generation, and basic statistical thinking.
- C++
- Probability
- Random Number Generation
- Simulation
- Statistical Analysis
- Runs repeated randomized experiments
- Estimates probability based on simulation results
- Uses C++ logic for calculation and outcome tracking
- Demonstrates the Monte Carlo method in a practical way
- Shows how probability can be approximated using code
Compile the program:
g++ main.cpp -o monte-carloRun the program:
./monte-carloIf your main file has a different name, replace main.cpp with the correct filename.
While building this project, I improved my understanding of:
- how Monte Carlo simulations work
- random number generation in C++
- probability estimation through repeated trials
- writing cleaner calculation logic
- using code to model mathematical problems
Portfolio: https://anurika.dev
GitHub: https://github.com/Nurik-tech
LinkedIn: https://www.linkedin.com/in/anurika-osuji/
