- Compute SINE series = x - x^3/3! + x^5/5! - x^7/7! + ... For given value of x and no of terms.
Convert to radian.
Multiply certain term by previous term to get the new term.
2. Pi value is given by the series = 4(1 - 1/3 + 1/5 - 1 / 7 ... )
Write a program to find value for 10000 no of terms.
Also find the no of terms the loop should be continued to get the value of pi as 3.14159.
No comments:
Post a Comment