Listing of file='EARINT.BAS;01' on disk='vmedia/financial_calc-sector.ccvf'
1 DEF FN R(X)= INT (X* 100+ .5)/ 100 5 PLOT 27,11,6,6,12,14 10 PRINT TAB( 20)"EARNED INTEREST TABLE" 21 PLOT 15,6,3 22 GOSUB 900 30 INPUT "PRINCIPLE ";P 50 INPUT "NOMINAL INTEREST RATE ";I 70 I= I/ 100 80 INPUT "NUMBER OF DEPOSITS/WITHDRAWALS PER YEAR ";N1 100 IF N1= 0THEN 160 110 INPUT "AMOUNT OF DEPOSIT/WITHDRAWAL ";R 130 N= 360 140 L2= N1 150 GOTO 200 160 INPUT "NUMBER OF COMPOUNDING PERIODS PER YEAR ";N 180 N1= 0 190 L2= 4 200 INPUT "START WITH WHAT YEAR ? ";X 220 INPUT "ENDING WITH WHAT YEAR ? ";Y 240 X= INT (X) 250 B0= P 260 I1= 0 270 I2= 0 280 I3= 0 300 P1= 4 310 FOR J0= 1TO INT (Y)+ 1 320 IF J0< XTHEN 480 370 K= 6 380 PLOT 12:PRINT TAB( 24)"EARNED INTEREST TABLE" 389 PRINT 390 PRINT " PRINCIPAL $"P" AT"I* 100" % NOMINAL FOR"Y" YEARS" 400 IF N1= 0THEN 430 420 K= K+ 1 430 PRINT :PRINT " EFFECTIVE INTEREST RATE"FN R(100* ((1+ I/ N)^ N- 1))" % PER YEAR" 440 PRINT :PRINT :PRINT 447 PRINT "YEAR "J0:PRINT "" 450 PRINT TAB( 8)"BALANCE";TAB( 22)"INTEREST ACCUM. INTEREST" 460 PRINT 480 L1= 1 490 N2= 1 500 P2= 1 510 FOR J1= 1TO N 520 IF N2> N1THEN 560 530 IF N2/ N1> J1/ NTHEN 560 540 B0= B0+ R 550 N2= N2+ 1 560 B2= B0* (1+ I/ N) 570 I1= B2- B0 580 I3= I3+ I1 590 I2= I2+ I1 600 IF P2/ P1> J1/ NTHEN 640 610 I2= FN R(I2) 620 B2= FN R(B2) 630 P2= P2+ 1 640 IF J0< XTHEN 710 650 IF J1/ N< L1/ L2THEN 710 660 L1= L1+ 1 670 PRINT TAB( 7)FN R(B2);TAB( 22)FN R(I3);TAB( 40)FN R(I2) 680 I3= 0 690 K= K+ 1 710 B0= B2 720 IF J0+ J1/ N- 1> = YTHEN 780 730 NEXT J1 740 IF J0< XTHEN 770 750 PRINT 760 K= K+ 1 770 NEXT J0 780 PRINT 790 INPUT "CHANGE DATA AND RECOMPUTE? Y/N ";Y$ 791 IF ASC (Y$)= 89THEN 21 800 IF ASC (Y$)< > 78THEN PLOT 28,11:GOTO 790 850 PLOT 1 900 PRINT "THIS PROGRAM CALCULATES AND PRINTS AN EARNED INTEREST" 910 PRINT "TABLE FOR INVESTMENTS":PRINT 920 PRINT "THE SCHEDULE CONTAINS THE FOLLOWING OUTPUTS: " 930 PRINT " 1) PERIODIC BALANCE" 940 PRINT " 2) INTEREST ACCUMULATED BETWEEN TWO PERIODS" 950 PRINT " 3) TOTAL INTEREST ACCUMULATED" 960 PRINT " 4) EFFECTIVE INTEREST RATE" 970 PRINT 980 PRINT "THESE OUTPUTS MAY BE CALCULATED FOR A SINGLE INVESTMENT" 990 PRINT "OR FOR AN INITIAL INVESTMENT WITH REGULAR DEPOSITS OR" 1000 PRINT "WITHDRAWALS. IF THE TABLE IS TO BE TABULATED FOR A SINGLE" 1002 PRINT "INVESTMENT, YOU MUST PROVIDE THE AMOUNT OF THE INITIAL" 1004 PRINT "INVESTMENT, THE NOMINAL INTEREST RATE, AND THE NUMBER OF" 1006 PRINT "COMPOUNDING PERIODS PER YEAR. YOUR NEW BALANCE WILL BE" 1008 PRINT "PRINTED FOUR TIMES PER YEAR.":PRINT 1010 PRINT "IF INTEREST IS COMPOUNDED LESS THAN FOUR TIMES PER YEAR," 1011 PRINT "YOUR NEW BALANCE WILL BE POSTED WITH EACH COMPUTATION." 1012 PRINT "IF THE TABLE IS TABULATED FOR REGULAR DEPOSITS OR WITHDRAWALS," 1013 PRINT "YOU MUST PROVIDE THE AMOUNT OF THE INITIAL INVESTMENT," 1014 PRINT "THE NOMINAL INTEREST RATE, THE NUMBER OF DEPOSITS OR" 1015 PRINT "WITHDRAWALS PER YEAR AND THEIR AMOUNT. IN THIS CASE IT" 1016 PRINT "IS ASSUMED INTEREST IS COMPOUNDED DAILY. YOUR NEW" 1017 PRINT "BALANCE WILL BE PRINTED AT EACH DEPOSIT OR WITHDRAWAL." 1019 PRINT :PRINT 1020 INPUT "HIT RETURN TO START ";A$ 1021 PLOT 6,6,12:RETURN