! Program Example from "Essential Fortran 90 & 95" by Loren P. Meissner
! Copyright 1996. Copying for sale requires permission from the author.
! Otherwise, distribution is permitted if these three lines are included.

! Example 2.6: Loop currents (two simultaneous equations by Cramer's rule).
  program C06
    implicit none
    real :: R1, R2, R3, V0, A, B, C, D, E, F, I1, I2
! start program C06
    read (unit = *, fmt = *) R1, R2, R3, V0
    A = R1 + R3
    B = -R3
    C = -R3
    D = R2 + R3
    E = V0
    F = 0.0
    I1 = (D * E - B * F) / (A * D - B * C)
    I2 = (A * F - C * E) / (A * D - B * C)
    write (unit = *, fmt = *) " I1 = ", I1, "; I2 = ", I2
    stop
  end program C06
