Trailing-Edge
-
PDP-10 Archives
-
decuslib20-01
-
decus/20-0025/saving.bas
There are 2 other files named saving.bas in the archive. Click here to see a list.
00100 PRINT
00105 PRINT " PROGRAM COMPUTES SUM ACCUMULATED AFTER (N) YEARS AT"
00110 PRINT " ANNUAL INTEREST (R) PERCENT COMPOUNDED (T) TIMES/YEAR"
00115 PRINT " ... ASSUMES INITIAL AMOUNT (P) DOLLARS WITH (D) "
00120 PRINT " DOLLARS BEING ADDED AT START OF EACH SUCCEEDING YEAR"
00125 PRINT
00130 PRINT " ENTER IN SEQUENCE THESE FIVE PARAMETERS -"
00135 PRINT " P(XXXXX.XX), D(XXXX.XX), R(XX.XXX), N(XXX),T(XXX) "
00140 PRINT
00145 PRINT
00150 INPUT L,N,A,Y,X
00155 IF X<>0 THEN 175
00160 PRINT
00165 PRINT " (T) CANNOT BE ZERO .. REENTER (T)"
00170 INPUTX
00175 LET D=0
00180 LET B=.01*A
00185 LET S=L
00190 LET D=0
00195 LET S=L
00200 FOR Z=1 TO Y
00205 LET S=S+D
00210 FOR W=1 TO X
00215 LET S=S*(1+B/X)
00220 NEXT W
00225 LET D=N
00230 NEXT Z
00235 PRINT
00240 PRINT" INIT. AMT","ADDN/YR","NO YRS.","PERCENT","PERIODS/YR"
00245 PRINT
00250 PRINTL,N,Y,A,X
00255 PRINT
00260 PRINT " YIELDS A TOTAL OF";S;"DOLLARS"
00265 PRINT
00270 PRINT
00275 PRINT " ENTER 0 TO STOP NOW, OR 1 TO CONTINUE -"
00280 PRINT
00281 PRINT
00285 INPUT K
00290 PRINT
00295 IF K = 1 THEN 130
00300 PRINT
00305 PRINT " PROGRAM FINISHED"
00310 END