Write a C program to solve the quadratic equation ax^2+bx+c=0. A quadratic equation has two roots which are given by the following two formulas: root1= -b+sqrt(b^2-4*a*c)/2*a root1= -b-sqrt(b^2-4*a*c)/2*a The program request the user for input a,b,c and the output will be root1 and root2.
1 Engineering AllOther 780
Question { 780 }
Write a C program to solve the quadratic equation ax^2+bx+c=0.
A quadratic equation has two roots which are given by the following two formulas:
root1= -b+sqrt(b^2-4*a*c)/2*a
root1= -b-sqrt(b^2-4*a*c)/2*a
The program request the user for input a,b,c and the output will be root1 and root2.
Answer
Is This Answer Correct ? | 0 Yes | 0 No |