Run a C code to solve the following problem:
Suppose that you are planning to pay $14500 yearly for 4 years for a car which is $50000 now what would be the interest rate?
You may follow the bellow formula:
P=A((1+i)^n-1)/(i(1+i)^n)
P is 50000, A is $14500 and n is 4 in this problem
Plug thee numbers and use Bisection method to find the roots for the interest rate i. Use [0.001,1] as the interval with maximum error< 0.001