How would I calculate an infinite series like this in a loop. 4 - 4/3 + 4/5 - 4/7 + 4/9 - 4/11 + etc. The user inputs how far to go like, 1 would be 4, 2 would be 2.667. 3 would be 3.467. How would I account for the fact that there is a + and - that switches?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.