<END SUBROUTINE Example Program>

Program end_subroutine_example
  Real :: a=1., b=3., c=2.
  Call shiki(a,b,c,x1,x2)
  Print *, x1,x2
End Program
Subroutine shiki(a,b,c,x1,x2)
    Real, Intent(In) :: a, b, c
    Real, Intent(Out) :: x1, x2
    d = b**2 - 4.0*a*c
    If (d>0.) Then
        x1 = (-b+Sqrt(d))/(2.0*a)
        x2 = (-b-Sqrt(d))/(2.0*a)
    End If
End Subroutine shiki

■ Execution Results

  -1.0000000  -2.0000000