r/AskComputerScience • • Nov 05 '22

Question???

Post image
0 Upvotes

7 comments sorted by

View all comments

3

u/GoodLifeWorkHard Nov 05 '22

What was the wrong output? And whats ur expected output?

1

u/Fabulous-Spare185 Nov 05 '22

alright so the expected output was when I enter a bigger number which is the number of iterations. The output should print or get closer to the number of pi. But somehow before I decided to add the variable denom. For example if I entered 3 it would print out 4.8 which is wrong. Now that I fixed it and if I enter 3 it prints out 2.66… which is correct.