Join Stack Overflow to learn, share knowledge, and build your career. Connect and share knowledge within a single location that is structured and easy to search. My program doesn't seem to give me the right solutions. Sometimes it does, sometimes it doesn't.
Quadratic Applications – She Loves Math
In this example, you will learn to find the roots of a quadratic equation in C programming. To understand this example, you should have the knowledge of the following C programming topics:. The term b 2 -4ac is known as the discriminant of a quadratic equation. It tells the nature of the roots. In this program, the sqrt library function is used to find the square root of a number. To learn more, visit: sqrt function. Course Index Explore Programiz.
Complex Numbers - Basic Definitions
In elementary algebra , the quadratic formula is a formula that provides the solution s to a quadratic equation. There are other ways of solving a quadratic equation instead of using the quadratic formula, such as factoring direct factoring, grouping, AC method , completing the square , graphing and others. Each of these two solutions is also called a root or zero of the quadratic equation. As well as being a formula that yields the zeros of any parabola, the quadratic formula can also be used to identify the axis of symmetry of the parabola,  and the number of real zeros the quadratic equation contains.
This program accepts coefficients of a quadratic equation from the user and displays the roots both real and complex roots depending upon the discriminant. The term b 2 -4ac is known as the discriminant of a quadratic equation. The discriminant tells the nature of the roots. In this program, sqrt library function is used to find the square root of a number.