1 3REM T R U I N T
2 7 PRINT "DO YOU WANT INSTRUCTIONS, 1=YES 0=NO"
3 8 INPUT Y7
4 9 IF Y7=0 THEN 80
5 10 PRINT"TRUINT"
6 20 PRINT "THIS PROGRAM WILL CALCULATE THE TRUE ANNUAL INTEREST"
7 30 PRINT "RATE CHARGED ON AN INSTALLMENT LOAN. YOU SUPPLY THE"
8 40 PRINT "VALUES OF FOUR VARIABLES: A = AMOUNT OF LOAN IN $,"
9 50 PRINT "P = AMOUNT OF EACH PAYMENT $, N = THE TOTAL NUMBER"
10 60 PRINT "OF PAYMENTS DUE, AND K = THE NUMBER OF PAYMENTS DUE"
11 70 PRINT "IN ONE YEAR. ";
12 80 PRINT "WHAT ARE A,P,N,K";
13 90 INPUT A, P, N, K
14 100 PRINT
15 110 IF N=1 THEN 510
16 120 IF P*N>=A THEN 180
17 130 PRINT
18 140 PRINT "THAT'S NOT REASONABLE. THE PAYMENTS ADD UP"
19 150 PRINT "TO LESS THAN THE AMOUNT OWED. TRY AGAIN:"
20 160 PRINT
21 170 GOTO 80
22 180 LET R=0
23 190 LET D=100
24 200 GOSUB 290
25 210 IF P=P1 THEN 390
26 220 IF P>P1 THEN 250
27 230 LET R=R-D
28 240 GOTO 260
29 250 LET R=R+D
30 260 LET D=D/2
31 270 IF D<0.0001 THEN 390
32 280 GOTO 200
33 290 LET R1=R/100*K
34 300 LET Q=1+R1
35 310 IF N*LOGQ/LOG10<=75 THEN 340
36 320 LET P1=A*R1
37 330 RETURN
38 340 IF Q>1 THEN 370
39 350 LET P1=A/N
40 360 RETURN
41 370 LET P1=A*Q^N*R1/Q^N-1
42 380 RETURN
43 390 LET R=0.01*INT0.5+100*R
44 400 LET R2=.01*INT.5+10000*1+R/100*K^K-1
45 410 IF R<199.5 THEN 460
46 420 PRINT
47 430 PRINT "RATE WOULD BE OVER 200 PERCENT. TRY AGAIN:"
48 440 PRINT
49 450 GOTO 80
50 460 PRINT "TRUE ANNUAL INTEREST RATE NOMINAL=";R
51 470 PRINT "TRUE ANNUAL INTEREST RATE EFFECTIVE=";R2
52 480 PRINT
53 490 PRINT "ANOTHER CASE? TYPE 'S' TO STOP NOW."
54 500 GOTO 80
55 510 LET R=P/A-1*K
56 520 LET R=100*R
57 530 GOTO 390
58 9999 END