      program quadratic
c Solve the quadratic equation
c
c    a*x**2 + b*x + c = 0
c
c using the quadratic formula
c
c  r = (-b-sqrt(b**2-4*a*c))/(2*a).

       print*,'enter a, b, and c'
       read*,a,b,c
       s=sqrt(b**2-4*a*c)
       r1=(-b-s)/(2*a)
       r2=(-b+s)/(2*a)
       print*,'roots are ',r1,' and ',r2
c As a check, print out the product of the roots
c (which should be c/a).
       print*,'product is',r1*r2
       print*,'should be ',c/a
       end
