C Program to Find Roots of Quadratic Equation

Here you will get C program to find roots of quadratic equation ax2+bx+c=0



Quadratic Equation is ax^2+bx+c=0
Enter values of a,b and c:1

Roots are complex and imaginary
Roots are -0.50+0.87i and -0.50-0.87i

" data-link="https://twitter.com/intent/tweet?text=C+Program+to+Find+Roots+of+Quadratic+Equation&url=https%3A%2F%2Fwww.thecrazyprogrammer.com%2F2013%2F05%2Fc-program-to-calculate-roots-of-2.html&via=">">Tweet

One thought on “C Program to Find Roots of Quadratic Equation

  1. Praveen

    Hi, I’ve a doubt in this program. When you find the value for imaginary root, why to use minus in square root (sqrt(-d))? Because the value which you get from d will already be in negative. Please make my doubt clear. I know it won’t work without negative sign but why it is like that?


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.