• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests
May 20, 2022 |7.8K Views
C++ Program to Find Roots of a Quadratic Equation
  Share   Like
Description
Discussion

In this video, we will see how to find the roots of a quadratic equation. This language is widely used nowadays for competitive programming. It consists of imperative, object-oriented, and generic programming features.

A quadratic equation in variable “x” is an equation of the form, ax2 + bx + c = 0

Where, a, b, and c are real numbers and constants, and a ≠ 0. The “roots” of the quadratic are the numbers that satisfy the quadratic equation. There are always two roots for any quadratic equation, although sometimes they may coincide.

Depending on the value of A, the nature of roots will change.
1. If A= 0, then the roots will be equal and real.
2. If A > 0, then the roots will be real and distinct.
3. If A < 0, then the roots will be imaginary.
If α and β are the roots of the equation, then Sum of roots = -b/a and Product of roots = c/a.

Program to find roots of Quadratic Equation: https://www.geeksforgeeks.org/program-to-find-the-roots-of-quadratic-equation/

Read More