1 REM - THIS PROGRAM CALCULATES SIMPLE AND COMPOUND INTEREST
10 PRINT "PROGRAM TO CALCULATE INTEREST OVER a certain number of years"
20 PRINT "WHAT IS THE PRINCIPAL AMOUNT";
30 INPUT P
40 PRINT"WHAT IS THE RATE OF INTEREST (X.XX)";
50 INPUT R
60 PRINT"COMPOUNDED HOW MANY TIMES PER YEAR";
70 INPUT N
75 INPUT "ENTER YEARS.";YE
80 R=R/100:A=P*R:S=P+A
90 PRINT:PRINT "YEAR","SIMPLE","COMPOUND"
100 FOR Y=1 TO YE:FOR X=1 TO N
110 P=P*(1+R/N):NEXT X
120 PRINT Y,S,P:S=S+A:NEXT Y
130 PRINT:END
