Compares home loans: from the amount, years, yearly interest rate and payments per year it shows the payment and the total cost, two loans to a screen.
RUN and answer the four questions for each loan, then press C for two more. The rate must be more than 0.
First printed in Time Designs, March/April 1985.
Published in LISTing November 1990 (House Payments).
Source Code
5 LET Z=0
6 BORDER 1: PAPER 6: INK 0
9 CLS
10 PRINT "AMOUNT? ";
20 INPUT A
30 PRINT A
40 PRINT "YEARS? ";
50 INPUT Y
60 PRINT Y
70 PRINT "INTEREST? ";
80 INPUT I
90 PRINT I
100 PRINT "PERIODS? ";
110 INPUT PER
120 PRINT PER
130 LET I=I/PER/100
140 LET N=PER*Y
150 LET P=A*I*(1+I)^N/((1+I)^N-1)
160 PRINT "MONTHLY PAYMENT=";INT (100*P+.5)/100
165 LET T= INT (100*P+.5)/100
170 PRINT
175 PRINT "TOTAL COST OF LOAN=";T*Y*PER
180 LET Z=Z+1
195 PRINT
200 PRINT "********************************"
205 IF Z=2 THEN GO TO 230
210 PRINT
220 GO TO 10
230 PRINT AT 20,5;"PRESS "; FLASH 1; "C"; FLASH 0;" TO CONTINUE"
240 IF INKEY$ ="C" OR INKEY$ ="c" THEN GO TO 5
250 GO TO 240.Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.

