QUADRATIC

 !Program name: QUADRATIC

!Roots of the quadratic equation

  Read *, A, B, C

  D = B**2 - 4.*A*C

  E = -B/(2.*A)

  F=sqrt(abs(D))/(2.*A)

  if (D .lt. 0.) print *, 'X1=',E, '+i' ,F, &

  &                       'X2=',E, '-i', F

  if (D .eq. 0) print *, 'X=', E

  if (D .gt. 0) print *, 'X1=', E+F, ' X2=', E-F

  stop

  end

Comentários

Postagens mais visitadas deste blog

HYDROGEN-RADIAL

HYDROGEN-POTENTIAL

ONE_PART_QHO