10 ARUN :CLEAR :WAIT 90:DIM ME$(0)*26
20 CLS :CURSOR 2:PRINT "Interest and Annuities"
30 CLS :CURSOR 2:PRINT "Copr. 1982 Tandy Corp."
40 " "RESTORE :WAIT 0:FOR I=1TO 10:CLS :READ ME$(0):PRINT ME$(0):FOR J=1TO 75:A$=INKEY$ :IF A$<>""LET J=75
50 NEXT J:FOR K=1TO 8:IF MID$ ("ABCDEFGX",K,1)=A$LET K=8:NEXT K:I=10:NEXT I:WAIT :CLS :GOTO A$
60 NEXT K:NEXT I:GOTO 40
100 DATA "Select Function:","Interest Functions:"
110 DATA "Future Value: A","Interest Rates: B"
120 DATA "Earned Interest: C","Required Investment: D"
130 DATA "Annuities Functions:","Future Value: E"
140 DATA "Earned Interest: F","Deposit Amount: G"
200 "A"V$="Future Value":GOSUB 670
210 GOSUB 500:GOSUB 520:GOSUB 540:GOSUB 560
220 Y=P*(1+R/M)^(M*N):GOSUB 640:GOSUB 650:GOTO 40
230 "B"V$="Interest Rate":GOSUB 670
240 GOSUB 580:GOSUB 520:GOSUB 540:GOSUB 560
250 Y=M*((F/P)^(1/(M*N))-1)*100:Z=((F/P)^(1/N)-1)*100
260 PRINT "Rate =";Y;" %":PRINT "Yield =";Z;" %":GOTO 40
270 "C"V$="Earned Interest":GOSUB 670
280 GOSUB 500:GOSUB 520:GOSUB 540:GOSUB 560
290 Y=P*(1+R/M)^(M*N)-P:GOSUB 640:GOSUB 660:GOTO 40
300 "D"V$="Req. Investment":GOSUB 670
310 GOSUB 580:GOSUB 500:GOSUB 520:GOSUB 540
320 Y=F/(1+R/M)^(M*N):GOSUB 640
330 PRINT "Investment $";Y:GOTO 40
340 "E"V$="Future Value":GOSUB 670
350 GOSUB 500:GOSUB 520:GOSUB 600:GOSUB 620
360 Y=((1+R/M)^(M*N)-1)/(R/M)*P:GOSUB 640:GOSUB 650:GOTO 40
370 "F"V$="Earned Interest":GOSUB 670
380 GOSUB 500:GOSUB 520:GOSUB 600:GOSUB 620
390 Y=((1+R/M)^(M*N)-1)/(R/M)*P-P*M*N
400 GOSUB 640:GOSUB 660:GOTO 40
410 "G"V$="Deposit Amount":GOSUB 670
420 GOSUB 580:GOSUB 500:GOSUB 520:GOSUB 600
430 Y=(F*R/M)/((R/M+1)^(M*N)-1)
440 GOSUB 640:PRINT "Deposit $";Y:GOTO 40
500 INPUT "Interest Rate (%) ?";R:R=R/100:RETURN 
510 GOTO 500
520 INPUT "Number of Years ?";N:RETURN 
530 GOTO 520
540 INPUT "# Compound/Year ?";M:RETURN 
550 GOTO 540
560 INPUT "Amount Invested ?";P:RETURN 
570 GOTO 560
580 INPUT "Future Value ?";F:RETURN 
590 GOTO 580
600 INPUT "# Deposits/Year ?";M:RETURN 
610 GOTO 600
620 INPUT "Amt of Deposits ?";P:RETURN 
630 GOTO 620
640 Y=INT (Y*100+.5)/100:RETURN 
650 PRINT "Future Value $";Y:RETURN 
660 PRINT "Earned Int $";Y:RETURN 
670 WAIT 90:PRINT "Variable = ";V$:WAIT :RETURN 
700 "X"END
