Question: I need help creating a quadratic equation solving program that includes the following instructions using the C programming language: This modifies a quadratic formula plotter

I need help creating a quadratic equation solving program that includes the following instructions using the C programming language:

This modifies a quadratic formula plotter to be array-based.

Ask for input for a b and c. You do not need to solve for the roots of the quadratic.

You will evaluate y=ax^2+bx+c and print the results, for:

  • x = ( 0.0 , 1.0 , 2.0 , 3.0 , . . . , 10.0 )
  • x = ( 1.0 , 0.1 , 0.01 , . . . , 0.00000001 )
  • x = ( 1.0 , 10.0 , 100.0 , . . . , 1 000 000 000.0 )
  • x = ( 10.0 , 9.0 , 8.0 , . . . , 8.0 , 9.0 , 10.0 )
  • You must create arrays of all four of the above sets of values
    • You must use loops to initialize these arrays
  • You must create arrays to store the y-results for all four of the above sets of values
  • You still must have a single function that returns y=ax^2+bx+c for a given a, b, c, and x; and use the loops to call it repeatedly
  • You must also have a single function that:
    • Accepts a, b, and c
    • Accepts an array of x values
    • Accepts a count of those x values
    • Accepts an array buffer for y values
    • Writes the computed y value for each x value into the corresponding spot in the y array buffer
  • You must format the printouts nicely, and make sure to distinguish between the four sets of values so the output is readable

You must go by the following:

  • Do no arithmetic in main(). Create functions that do all your math.
  • Do not use any global variables.
  • Comment every function, every "paragraph" of code, and any line of code that does more than two things.
  • Indent the code properly.

The code must compile without errors and run with any reasonable values of a, b and c

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!