Skip to content

Latest commit

 

History

History
16 lines (6 loc) · 799 Bytes

README.md

File metadata and controls

16 lines (6 loc) · 799 Bytes

Calculating Number π

Calculation of π in this project is proced using random generated numbers and relationship between field of a circle and a square. Knowing the fact that circle inscribed in square share the same length of diameter as the side of a square we can derive the formula of PI number which is:

equation

Based on this formula we can calculate the approximate value of the number PI

In this program Pcircle and Psquare are the number of dots that are randomly placed either in circle field or square field.

Accuracy of calculated π number strictly depends on randomness of the generated random numbers