You are write a program whcih uses the quadratic equation to solve second-order polynominal. wchich is
a x**2 + b x + c =0
and use the quadratic equation, when given value for the coefficient a, b and c, to find the value of x for which the equation is true the quadratic equation is
-b +- sqrt (b**2 -4ac)
X = --------------------------------------------
2a
program should prompt for the value of cofficients a, b and c from the user and the output the solutions. The interaction with the user might look like this:
Input value for the cofficient a: 2
Input value for the cofficient b: 5
Input value for the cofficient c: 1
The possible value for x are :
-0.219223593595585
-2.28077640640442
Kindly provide the code that you have tried and tell where you are facing problems. Providing answers for Homework is against the policies of the forum.
Kindly provide the code that you have tried and tell where you are facing problems. Providing answers for Homework is against the policies of the forum.
Kindly provide the code that you have tried and tell where you are facing problems. Providing answers for Homework is against the policies of the forum.
He's forum shopping for the answer, posting the same question on multi-forums (up to three now that I have seen). I recommend you delete this thread, this person does not want help, he wants the answer coded and ready to turn in for a grade.