Computer Science, asked by Gurusreeram, 10 days ago

1.Find the roots of the quadratic equation
import math
a = int(input("enter the value of a (a not 0)"))
b = int(input("enter the value of b"))
c = int(input("enter the value of c"))
d = b*b - 4*a*c
if d < 0 :
print("roots are imaginary ")
else : r1 = (-b + math.sqrt(d))/(2*a)
r2 = (-b - math.sqrt(d))/(2*a)
print(r1, r2)

Answers

Answered by charananu2004
0

Answer:

correct answer only

what doubt?

Similar questions