jeudi 24 mars 2016

Use rand() to find the value of PI

Imagine, I have a square with all border same 1cm. And probability to have take a point in the circle of quare is Pi/4.

How can I use rand() function in C to find exactly the value of Pi (red place is the locate of point)?

enter image description here




Aucun commentaire:

Enregistrer un commentaire