Week 3: Review and exercises

Classwork - Week 3

Develop a C program that allows the user to input a polynomial function and select a root-finding method - either the Newton-Raphson method or the Bisection method. The program should then find and display the root of the polynomial based on the selected method. In addition, your program should display results from the loop in each method.

To simplify the program, you can try to focus on polynomial with upto 2nd degree in your program. Use what you have learned so far, including input-output, function, loops and control flows.

Useful function: fabs(double n) in math.h. The fabs() function takes a single argument (in double) and returns the absolute value of that number (also in double).

Last updated