Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C# PROGRAM !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! USING ONLY THE #INCLUDE HEADER !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! NO OTHER TYPE OF HEADER ALLOWED PLEASE Program #2 Write a program to evaluate any function

C# PROGRAM

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! USING ONLY THE #INCLUDE HEADER !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

NO OTHER TYPE OF HEADER ALLOWED PLEASE

image text in transcribedimage text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions