      PROGRAM REDUCE
      WRITE (*, *) 'Enter amount, % rate, years'
      READ (*, *) AMOUNT, PCRATE, NYEARS
      RATE = PCRATE / 100.0
      REPAY = RATE * AMOUNT / (1.0 - (1.0 + RATE)**(-NYEARS))
      WRITE (*, *) 'Annual repayments are ', REPAY
      WRITE (*, *) 'End of Year  Balance'
      DO 15 IYEAR = 1, NYEARS
         AMOUNT = AMOUNT + (AMOUNT * RATE) - REPAY
         WRITE (*, '(1X,I9,F11.2)') IYEAR, AMOUNT
 15   CONTINUE
      END
.
