digits variable isn't used by the series approximation. You get exactly the same value regardless of digits.
YOU have 100% right it's my first year in programing sorry
Pasting in your previous code for series 2, I get: 3.141592644041437 this is accurate to 7 significant digits.
yes and i want to make my program to read ONLY the digits that the user set for example 2 3.14 ONLY
In you final code you've used series 1; where as in the example usage you enter series 2.
sorry i didn't see that i used series 2 because is approximate on 1000 iterations with 5 digits
Why do I keep finding people trying to calculate PI !
good theory, ask the university about that not me :D
also with that
cout << setprecision(16); cout << PIi just cout the PI before that how i can't round it and check it.... ??? this is my whole problem if you cout the PI you don't have problem but it is not the same thing if you check it.......( it's has other numbers,digits)
Login