Question: Write code using c++ sin(x) can be approximately calculated using the following formula, where n! is factorial(n)for example 313*2*1 6 (the function in previous problem)
Write code using c++
sin(x) can be approximately calculated using the following formula, where n! is factorial(n)for example 313*2*1 6 (the function in previous problem) 00 (-1) 2n+1 sin(-I ..for all z n-o (2n +1)! 3! 5! The more terms we use in the series, the higher will be accuracy of the calculations. By using infinite terms in the series we will have the exact value Hint 1: factorialFunc (n) Hint 2: A simple for loop is needed. Much easier that it looks. Write a program that gets x and calculates sin(x) using 10, 100, 1000 and 10,000 terms
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
