Question: Write, compile and run a C program to do the following: Create a user-defined function called 'polynomial(x)' that takes one parameter, the X-value, and computes
Write, compile and run a C program to do the following: Create a user-defined function called 'polynomial(x)' that takes one parameter, the X-value, and computes the polynomial function: 2X^3 + 6X^2 + 4x + 7. NOTE: You MUST create a user-defined function called 'polynomial()' and make a function call from the main() function to receive any marks for this question. NOTE: x^3 means x to the exponent 3. Note is not an operator in the language. Refer to the sample run below: NOTE: The Name, Student ID and Section that appears in the output of the program should be your own, not the ones used in the sample run. Sample run 1: My name: Smith, Peter My ID: 300999999 My section: 001 Enter an X-value: 12.4 The result of the equation 2X^3 + 6X^2 + 4x + 7 is : 4792.41 Press any key to continue ... PROGRAM OUTPUT Provide TWO sample runs and paste it to your WORD document: For the FIRST sample run, input from the keyboard the X-value of 6.8 - For the SECOND sample run, input from the keyboard the X-value of 14.2 #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
