Question: please write in C Program #2 Write a program to evaluate any function of order 5 or less at a given interval [xmin, xmax], and

please write in Cplease write in C Program #2 Write a program to evaluate any

Program #2 Write a program to evaluate any function of order 5 or less at a given interval [xmin, xmax], and display a table with the values of x, and fr) INPUT: The program will ask the user to enter a) (5 points) The function's order f ordeir If the order is greater than 5 or smaller than 1, an error message should be displayed and the program ends, Otherwise, the program will ask for the respective coefficients . b) (5 points) The values for xmin and xmax .Ifthe value for xmax is smaller or equal to xmin, an error messages should be displayed and the program will end. Assume that f(x) is defined as fo)ax bx cx + dr2 ex +f. (20 points) If the f order is . 5, then the program will ask for coefficients a, b, c, d, e and f, . 4, then the program will ask for coefficients b, c, d, e and f, * 3, then the program will ask for coefficients c, d, e and f * 2, then the program will ask for coefficients d, e and f, * 1, then the program will ask for coefficients e and f, OUTPUT: The output is formatted as a table. The first column will display the values of x, and the second column the values of fx). The first row should always have the value xmin for x, and f(xmin) for fx). Last row should always have the value xmax for x, and f(xmax) for ffx) The table will look like f(x) I f(xmin) xmin xmin +dxf(xmin+dx) xmin +2dx |f(xmin+2dx) xmin +3dx |f(xmin+3dx) xmin +4dx |f(xmin+4dx) If(xmax) xmax Page 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!