Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Database Processing Fundamentals Design

Authors: Marion Donnie Dutton Don F. Seaman

14th Edition Globel Edition

1292107634, 978-1292107639

Students also viewed these Databases questions