Question
Using C++ For this program you are going to create a class that helps to solve the quadratic equation. The equation has the following form:
Using C++
For this program you are going to create a class that helps to solve the quadratic equation. The equation has the following form:
ax2 + bx + c = 0
The roots of the equation are:
x1 = -b + sqrt(b2 - 4 * a * c) and x2 = -b - sqrt(b2 - 4 * a * c)
The phrase in the parenthesis is called the discriminant. If the value of the discriminant is positive, the equation has two roots. If it is zero, the equation has one root. If it is negative, the equation has no roots.
Create a class named Quadratic that finds the roots of a quadratic equation when the coefficients a, b, and c are given.
Hint: You should create three individual coefficient private members.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started