Question: 1- A quadratic equation for variable x is expressed as: ax2 + bx + c = 0, where a, b, and c are the
1- A quadratic equation for variable x is expressed as: ax2 + bx + c = 0, where a, b, and c are the coefficients. The two roots of a quadratic equation can be calculated using the following quadratic formula: -bb2-4ac 2a For example, the roots of x2 - 3x 40 are x 4 and x = -1 a) Write a C++ program to solve the quadratic equation. Compare your answer with the example above. b) What are the datatypes that should be used in the program to represent the formula's coefficients?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
