10 DIM Z$(5) 20 DIM M$(5) 21 PR$="####.##%" 22 V$="$$#,###,###,###.##" 23 I$="###.##%" 24 D$="--------------------------------------------------------------------------------" 25 KEY OFF 26 I2$="##" 27 Y$="Y":N$="N" 30 DEFDBL J,B,R,A,Q,P,T,Y 40 CLS 50 PRINT D$; 60 PRINT SPC(38);"MENU" 70 PRINT D$; 80 PRINT "(1) Future Value of Investment (11) Depreciated Investment" 90 PRINT 100 PRINT "(2) Future Value of Annuity (12) Salvage Value Year End" 110 PRINT 120 PRINT "(3) Future Value of Savings (13) Discounted Commercial Paper" 140 PRINT "(4) Withdrawals From Investment (14) Loan Principal" 150 PRINT 160 PRINT "(5) Minimum Investment for Income (15) Loan Payment Schedules" 170 PRINT 180 PRINT "(6) Income From Investments (16) Final Loan Payments" 185 PRINT 190 PRINT "(7) Nominal Interest Rates (17) Remaining Loan Balance" 200 PRINT 210 PRINT "(8) Effective Interest Rates (18) Loan Repayment Periods" 220 PRINT 230 PRINT "(9) Earned Interest Table (19) Loan Annual Interest Rate" 240 PRINT 250 PRINT "(10) Annual Depreciation Rate (20) Mortgage Amortization Table" 255 LOCATE 23,1,1 260 PRINT D$; 270 INPUT "Select a Program by Number (0 to Exit): ";Z 280 IF Z=0 THEN 5000 290 ON Z GOTO 330,510,690,880,1100,1330,1560,1780,1960,2030,2230,2420,2610 300 IF Z>14 THEN Z1=Z-13 310 ON Z1 GOTO 2820,2980,3170,3410,3670,3850,3910 320 GOTO 40 330 GOSUB 4500 340 PRINT" #1 Future Value of Investment":PRINT D$; 345 LOCATE 23,1:PRINT D$; 350 LOCATE 8,1:INPUT "Enter the Initial Value of Investment: ";P:LOCATE 8,63:PRINT USING V$;P 360 INPUT "Enter Nominal Interest Rate: ";I:LOCATE 10,63:PRINT USING I$;I 410 PRINT:INPUT "Enter Number of Compounding Periods Each Year: ";N:LOCATE 12,63:PRINT N 420 PRINT 430 INPUT "Enter Number of Years for the Investment: ";Y:LOCATE 14,63:PRINT Y 440 PRINT 450 I=I/N/100 460 T=P*(I+1)^(N*Y):PRINT:PRINT 470 PRINT"Future Value of This Investment is: ";:LOCATE 18,63:COLOR 15,8:PRINT USING V$;T:COLOR 7 480 LOCATE 25,1:INPUT "Want Another Future Value Calculation (Y or N): ";ANS$ 490 IF LEFT$(ANS$,1)=Y$ THEN 330 ELSE 40 510 GOSUB 4500:PRINT" Future Value of Regular Deposits - Annunity":PRINT D$; 515 LOCATE 23,1:PRINT D$; 550 LOCATE 8,1:INPUT "Enter Amount of Regular Deposit: ";R 560 LOCATE 8,63:PRINT USING V$;R 570 LOCATE 10,1:INPUT "Enter Nominal Interest Rate: ";I:LOCATE 10,65:PRINT USING I$;I 590 PRINT:INPUT "Enter Number of Deposits Each Year: ";N:LOCATE 12,65:PRINT N 610 PRINT:INPUT "Enter the Number of Years: ";Y:LOCATE 14,65:PRINT Y 620 I=I/N/100 630 T=R*((I+1)^(N*Y)-1)/I 650 PRINT:PRINT "FUTURE VALUE IS: ";:LOCATE 16,63:COLOR 10,8:PRINT USING V$;T:COLOR 7 660 LOCATE 25,1:INPUT "Another Future Value Calculation (Y or N): ";ANS$ 670 IF LEFT$(ANS$,1)="y" THEN 510 ELSE CLS: GOTO 40 690 GOSUB 4500 700 PRINT " Future Value of Annuity or Savings Account" 710 GOSUB 4510 720 LOCATE 8,1:INPUT "Enter Desired Future Value: ";T:LOCATE 8,63:PRINT USING V$;T 740 INPUT "Enter Nominal Interest Rate: ";I:LOCATE 10,63:PRINT USING I$;I 750 PRINT:INPUT "Enter Number of Deposits Per Year: ";N:LOCATE 12,63:PRINT N 780 PRINT:INPUT "Enter the Number of Years: ";Y:LOCATE 14,63:PRINT Y 790 I=I/N/100 800 R=T*I/((I+1)^(N*Y)-1) 802 R$=STR$(R):T$=STR$(T) 804 L1=LEN(R$):L2=LEN(T$) 810 PRINT:PRINT:PRINT"Regular deposits of: ";:COLOR 10,8:LOCATE 17,(22-(13-L1)):PRINT USING V$;R;:COLOR 7:PRINT" will yield:";:PRINT USING V$;T:PRINT" in: ";Y;" years" 820 LOCATE 25,1:INPUT "Another run (Y or N): ";ANS$ 830 IF LEFT$(ANS$,1)="Y" THEN 690 ELSE 40 880 GOSUB 4500:PRINT" Regular Wuthdrawals from an Investment":PRINT D$:LOCATE 23,1:PRINT D$; 910 LOCATE 8,1:INPUT "Enter the amount of your initial investment: ";P:LOCATE 8,63:PRINT USING V$;P 920 INPUT "Enter nominal interest rate: ";I:LOCATE 10,63:PRINT I 940 PRINT:INPUT "Enter the number of withdrawals each year: ";N:LOCATE 12,63:PRINT N 950 PRINT:INPUT "Enter the number of years: ";Y:LOCATE 14,63:PRINT Y 970 I=I/N/100 980 R=P*(I/((I+1)^(N*Y)-1)+I) 990 LOCATE 18,1:PRINT"You may withdraw: ";:COLOR 15:PRINT USING V$;R;:COLOR 7:PRINT" from your account: ";N:PRINT"times per year for : ";Y;" years without reducing your initial investment" 1070 LOCATE 24,1:INPUT "Do you want another calculation (Y or N): ";ANS$ 1080 IF ANS$="Y" THEN 880 ELSE 40 1100 GOSUB 4500:PRINT" INVESTMENT REQUIRED TO PROVIDE FUTURE VALUE":GOSUB 4510 1110 LOCATE 8,1:INPUT "Enter amount you wish to end up with: ";T:LOCATE 8,63:PRINT USING V$;T 1120 INPUT "Enter the number of compounding periods each year: ";N:LOCATE 10,63:PRINT N 1130 PRINT:INPUT "Enter the number of years for this investment: ";Y:LOCATE 12,63:PRINT Y 1140 PRINT:INPUT "Enter the nominal interest rate: ";I:LOCATE 14,63:PRINT I 1220 I1=I 1230 I=I/N/100 1240 P=T/(I+1)^(N*Y) 1250 LOCATE 18,1:PRINT"You must invest: ";:COLOR 15:PRINT USING V$;P;:COLOR 7:PRINT" to yield: ";:PRINT USING V$;T 1260 LOCATE 24,1:INPUT "Do you want to make another calculation: ";ANS$ 1270 IF ANS$="Y" THEN 1100 ELSE 40 1330 GOSUB 4500:PRINT" MINIMUM INVESTMENT FOR INCOME";:PRINT D$:LOCATE 23,1:PRINT D$;:LOCATE 8,1 1380 INPUT "Enter number of withdrawals each year: ";N:LOCATE 8,63:PRINT USING V$;Y 1390 INPUT "Enter amount of each withdrawal: ";R:LOCATE 10,63:PRINT USING V$;R 1420 INPUT "Enter the nominal interest rate: ";I:LOCATE 12,63:PRINT USING I$;I 1430 PRINT:INPUT "Withdrawal to occur for how many years: ";Y:LOCATE 14,63:PRINT Y 1450 I1=I 1460 I=I/100 1470 P=R*N/I*(1-1/((1+I/N)^(N*Y))) 1490 LOCATE 18,1:PRINT"A minimum investment of: ";:COLOR 15:PRINT USING V$;P;:COLOR 7:PRINT" will yeild your desired return" 1500 LOCATE 24,1:INPUT "Do you want another calculation (Y or N): ";ANS$ 1510 IF ANS$="Y" THEN 1330 ELSE 40 1560 CLS:PRINT D$:PRINT" NOMINAL INTEREST ON INVESTMENTS:":PRINT D$:LOCATE 23,1:PRINT D$; 1570 LOCATE 8,1:INPUT "Enter the amount of the principal: ";P:LOCATE 8,63:PRINT USING V$;P 1580 INPUT "Enter total amount of investment: ";T:LOCATE 10,63:PRINT USING V$;T 1630 INPUT "Enter the number of years of the investment: ";Y:LOCATE 12,63:PRINT Y 1670 PRINT:INPUT "Enter the comounding periods each year: ";N:LOCATE 14,63:PRINT N 1680 I2=N*((T/P)^(1/(N*Y))-1)*100 1700 LOCATE 18,1:PRINT "The nominal interest rate for the above parameters is: ";:COLOR 15:PRINT I2;:COLOR 7 1710 LOCATE 25,1:INPUT "Do you want another calculation (Y or N): ";ANS$ 1720 IF ANS$="Y" THEN 1560 ELSE 40 1780 GOSUB 4500:PRINT" EFFECTIVE INTEREST ON INVESTMENTS";:GOSUB 4510 1830 LOCATE 8,1:INPUT "Enter the amount of the initial investment";P:LOCATE 8,63:PRINT USING V$;P 1850 INPUT "Enter the desired future value: ";T:LOCATE 10,63:PRINT USING V$;T 1870 INPUT "Enter the life of the investment in years";Y:LOCATE 12,72:PRINT Y;"Years" 1880 A=((T / P) ^ (1 / Y) - 1) * 100 1900 LOCATE 14,1:PRINT"The effective annual interest rate of the investment is:";:COLOR 10,8:PRINT USING PR$;A:COLOR 7 1930 LOCATE 25,1:INPUT "Do you want to run another (Y or N): ";ANS$:IF LEFT$(ANS$,1)=Y$ THEN 1780 ELSE 40 1940 PRINT : IF LEFT$ (Y$,1) = "Y" THEN GOSUB 4370: GOTO 1780 1950 GOTO 40 1960 REM EARNED INTEREST TABLE 1970 CLS:PRINT D$ 1980 PRINT "#9 EARNED INTEREST TABLE FOR INVESTMENT" 1990 PRINT 2000 PRINT D$ 2010 PRINT " ******** UNDER CONSTRUCTION ********" 2020 FOR I = 1 TO 2000: NEXT I: GOTO 40 2030 REM DEPRECIATION RATE ON INVESTMENT 2040 GOSUB 4500 2050 PRINT " ANNUAL DEPRECIATION RATE OF AN INVESTMENT" 2060 GOSUB 4510 2080 LOCATE 8,1:INPUT "Enter the Original Price of the Item";P:LOCATE 8,63:PRINT USING V$;P 2100 INPUT "Enter the Resale Price of the Item";T:LOCATE 10,63:PRINT USING V$;T 2120 INPUT "Enter the Item's Life in Years";Y:LOCATE 12,73:PRINT USING I2$;Y;:PRINT" Years" 2140 D = 100 * (1 - (T / P) ^ (1 / Y)) 2160 LOCATE 16,1:PRINT "If You Purchased This Item for:";:PRINT USING V$;P;:PRINT" and Sold it ";:PRINT USING I2$;Y;:PRINT" Years Later-" 2180 PRINT "for: ";:PRINT USING V$;T;:PRINT", the Actual Depreciation Rate is: ";:COLOR 10,8:PRINT USING PR$;D:COLOR 7 2200 LOCATE 25,1:INPUT "Another Run (Y or N): ";ANS$ 2210 IF LEFT$ (ANS$,1) = "Y" THEN 2040 ELSE 40 2230 REM CALCULATE THE AMOUNT OF DEPREC OF AN ITEM 2240 GOSUB 4500 2250 PRINT " AMOUNT DEPRECIATED WITHIN A YEAR" 2260 GOSUB 4510 2270 LOCATE 8,1:INPUT "Enter the Original Price of the Item:";P:LOCATE 8,63:PRINT USING V$;P 2280 PRINT 2290 K = 100 2300 INPUT "WHAT PERCENT DO YOU WANT TO DEPRECIATE";I 2310 PRINT 2320 I = I / 100 2330 PRINT : FOR Y = 1 TO K 2340 D = P * I * (1 - I) ^ (Y - 1) 2350 PRINT "YEAR #";Y;"DEPRECIATION IS $"; D: PRINT 2360 X = X + 1: IF X = 5 THEN X = 0 2370 PRINT "PRESS RETURN FOR MORE": INPUT X$: PRINT 2380 IF D > = 2 THEN NEXT Y 2390 PRINT : INPUT "DO YOU WANT TO RUN ANOTHER (Y/N)";Y$ 2400 IF LEFT$ (Y$,1) = "Y" THEN GOSUB 4370: GOTO 2230 2410 GOTO 40 2420 CLS:PRINT D$ 2430 PRINT " #12 CALCULATE THE SALVAGE VALUE" 2440 PRINT " OF AN ITEM..." 2450 PRINT D$ 2460 INPUT "ENTER THE ORIGINAL PRICE OF THE ITEM";P 2470 PRINT 2480 INPUT "ENTER THE ITEM'S DEPRECIATION RATE";I 2490 PRINT 2500 K = 100 2510 FOR Y = 1 TO K 2520 S = P * (1 - I / 100) ^ Y 2530 PRINT "YEAR #";Y;"SALVAGE VALUE IS $";S 2540 PRINT 2550 X = X + 1: IF X = 5 THEN X = 0 2560 PRINT "PRESS RETURN FOR MORE": INPUT X$: PRINT 2570 IF S > = 2 THEN NEXT Y 2580 PRINT : INPUT "DO YOU WANT TO RUN ANOTHER (Y/N)";Y$ 2590 IF LEFT$ (Y$,1) = "Y" THEN GOSUB 4370: GOTO 2420 2600 GOTO 40 2610 REM FIND AMOUNT OF DISC PAPER 2620 CLS:PRINT D$ 2630 PRINT "#13 CALCULATE THE NET COST OF DISCOUNTED" 2640 PRINT " PAPER.." 2650 PRINT D$ 2660 PRINT 2670 INPUT "ENTER THE FUTURE VALUE OF THE NOTE";T 2680 INPUT "ENTER THE DISCOUNT RATE";D 2690 PRINT 2700 INPUT "ENTER THE NUMBER OF DAYS TO MATURITY";N 2710 D = D / 100 2720 D1 = T * D * N / 360 2730 PRINT 2740 PRINT "IF YOU PURCHASE A NOTE WORTH $";T 2750 PRINT " DUE IN";N;"DAYS" 2760 PRINT "AT A DISCOUNT RATE OF";D * 100;"PERCENT," 2770 PRINT "THE DISCOUNT AMOUNT WILL BE $";D1 2780 PRINT "AND THE COST WILL BE $";T - D1;" ." 2790 PRINT : PRINT : INPUT "DO YOU WANT TO RUN ANOTHER (Y/N)";Y$ 2800 IF LEFT$ (Y$,1) = "Y" THEN GOSUB 4370: GOTO 2610 2810 GOTO 40 2820 CLS:PRINT D$ 2830 PRINT TAB( 5)"#14 PRINCIPAL ON A LOAN" 2840 PRINT 2850 PRINT D$ 2860 INPUT "HOW MANY PAYMENTS DO YOU MAKE EACH YEAR";N 2870 PRINT 2880 INPUT "WHAT IS THE AMOUNT OF EACH PAYMENT";R 2890 PRINT 2900 INPUT "WHAT IS THE LOAN ANNUAL INTEREST RATE";I 2910 PRINT 2920 INPUT "ENTER THE LIFE OF THE LOAN IN YEARS";Y 2930 P = R * N * (1 - 1 / ((I / 100) / N + 1) ^ (N * Y)) / (I / 100) 2940 PRINT:PRINT "The principal on this loan is: "; USING "$$#,###,###.##";P 2950 PRINT : PRINT : INPUT "DO YOU WANT TO RUN ANOTHER (Y/N)";Y$ 2960 IF LEFT$ (Y$,1) = "Y" THEN GOSUB 4370: GOTO 2820 2970 GOTO 40 2980 CLS:PRINT D$ 2990 PRINT " #15 REGULAR PAYMENT ON A LOAN.." 3000 PRINT 3010 PRINT D$ 3020 PRINT "WHAT IS THE LIFE OF THE LOAN IN YEARS" 3030 INPUT Y 3040 INPUT"WHAT IS TRHE ANNUAL INTEREST RATE ";I 3050 INPUT "HOW MANY PAYMENTS DO YOU MAKE EACH YEAR";N 3060 INPUT "WHAT IS THE LOAN PRINCIPAL AMOUNT";P 3070 PRINT : PRINT :R = ((I / 100) * P / N) / (1 - 1 / ((I / 100) / N + 1) ^ (N * Y)) 3080 I1 = I 3090 PRINT "Regular payments of "; USING "$$#,###,###.##";R; 3100 PRINT " made ";N;" times each year" 3110 PRINT "are required to satisfy" 3120 PRINT "a loan of "; USING "$$#,###,###.##";P;: PRINT " for a period of "; USING "###";Y;: PRINT" years" 3130 PRINT "at an interest rate of";I1;" pecent per annum." 3140 PRINT : PRINT : INPUT "DO YOU WANT TO RUN ANOTHER (Y/N)";Y$ 3150 IF LEFT$ (Y$,1) = "Y" THEN GOSUB 4370: GOTO 2980 3160 GOTO 40 3170 CLS:PRINT D$ 3180 PRINT TAB( 10)"#16 LAST PAYMENT ON A LOAN" 3190 PRINT 3200 PRINT D$ 3210 INPUT "WHAT IS THE LIFE OF THE LOAN IN YEARS";Y 3220 INPUT "ENTER THE ANNUAL INTEREST RATE";I 3230 PRINT 3240 INPUT "WHAT IS THE AMOUNT OF EACH REGULAR PAYMENT";R 3250 PRINT 3260 INPUT "HOW MANY PAYMENTS DO YOU MAKE EACH YEAR";N 3270 PRINT 3280 INPUT "ENTER THE AMOUNT OF THE LOAN PRINCIPAL";P 3290 PRINT :I1 = I:I = I / 100:BO = P 3300 IF N * Y > 100 THEN PRINT TAB( 20)"WORKING THE PROBLEM" 3310 FOR J1 = 1 TO N * Y 3320 I2 = INT ((BO * I / N) * 100 + .5) / 100 3330 A = R - I2 3340 BO = BO - A 3350 NEXT J1 3360 PRINT "THE LAST PAYMENT FOR THIS LOAN," 3370 PRINT "WILL BE $"; INT ((R + BO) * 100 + .5) / 100 3380 PRINT : PRINT : INPUT "DO YOU WANT TO RUN ANOTHER (Y/N)";Y$ 3390 IF LEFT$ (Y$,1) = "Y" THEN GOSUB 4370: GOTO 3170 3400 GOTO 40 3410 CLS:PRINT D$ 3420 PRINT " #17 REMAINING BALANCE ON A LOAN" 3430 PRINT 3440 PRINT D$ 3450 INPUT "ENTER THE NUMBERS OF PAYMENTS MADE EACH YEAR";N 3460 PRINT 3470 INPUT "ENTER THE ANNUAL INTEREST RATE";I 3480 PRINT 3490 INPUT "WHAT IS THE AMOUNT OF EACH PAYMENT";R 3500 PRINT 3510 INPUT "WHAT IS THE AMOUNT OF THE LOAN PRINCIPAL";P 3520 PRINT 3530 PRINT "ENTER THE LAST PAYMENT MADE ," 3540 INPUT " (PAYMENT #, YEAR # )";N1,Y 3550 PRINT : PRINT "WORKING ON PROBLEM" 3560 I = I / 100 3570 BO = P 3580 FOR J1 = 1 TO N * (Y - 1) + N1 3590 I1 = INT ((BO * I / N) * 100 + .5) / 100 3600 A = R - I1 3610 BO = BO - A 3620 NEXT J1 3630 PRINT : PRINT "THE REMAINING BALANCE IS $"; INT (BO * 100 + .5) / 100 3640 PRINT : INPUT "DO YOU WANT TO RUN ANOTHER (Y/N)";Y$ 3650 IF LEFT$ (Y$,1) = "Y" THEN GOSUB 4370: GOTO 3410 3660 GOTO 40 3670 CLS:PRINT D$ 3680 PRINT TAB( 10)"THE TERM OF A LOAN" 3690 PRINT 3700 PRINT D$ 3710 INPUT "ENTER THE NUMBER OF PAYMENTS EACH YEAR";N 3720 PRINT 3730 INPUT "ENTER THE ANNUAL INTEREST RATE";I 3740 PRINT 3750 INPUT "WHAT IS THE AMOUNT OF EACH REGULAR PAYMENT";R 3760 PRINT 3770 INPUT "WHAT IS THE AMOUNT OF THE LOAN PRINCIPAL";P 3780 PRINT 3790 Y = - ( LOG (1 - (P * (I / 100)) / (N * R)) / ( LOG (1 + I / 100 / N) * N)) 3800 PRINT "A TERM OF"; INT (Y * 10 + .5) / 10;"YEARS WILL SATISFY THIS LOAN." 3810 PRINT "SATISFY THIS SCHEDULE." 3820 PRINT : INPUT "DO YOU WANT TO RUN ANOTHER (Y/N)";Y$ 3830 IF LEFT$ (Y$,1) = "Y" THEN GOSUB 4370: GOTO 3670 3840 GOTO 40 3850 CLS:PRINT D$ 3860 PRINT "#19 THE ANNUAL INTEREST RATE ON A LOAN" 3870 PRINT D$ 3880 PRINT " ******** UNDER CONSTRUCTION ********" 3890 FOR I = 1 TO 2000: NEXT I 3900 GOTO 40 3910 CLS:PRINT D$ 3920 PRINT " THE MORTGAGE AMORTIZATION TABLE" 3930 PRINT 3940 PRINT " COMPUTE INTEREST PAYMENTS..." 3950 PRINT 3960 PRINT D$ 3970 PRINT D$ 3980 REM LEADING & TRAILING ZERO'S NOT ?"ED" 3990 C = 0 4000 INPUT "Enter Amount of Loan";A 4010 INPUT "Amount of Interest in Percent";J 4020 INPUT "Nunber of Years";N 4030 J = J / 100 4040 N = N * 12:I = J / 12:B = 1 + I:R = A * I / (1 - 1 / B ^ N) 4050 PRINT "Amount per Payment =";USING"$$,###,###.##";R 4060 Q = (R * N - A) 4080 PRINT "Total Interest=";USING"$$,###,###.##";Q 4090 PRINT "To Begin Listing Hit Any Key...":F=0 4100 A$=INKEY$ 4110 IF A$="" THEN 4100 4120 PRINT :B = A 4130 GOSUB 4370 4140 PRINT "PMT INTEREST PRINCIPAL BALANCE" 4150 C = C + 1:L = B * I:P = R - L:B = B - P:IF B<0 THEN B=0 4160 PRINT USING"###";C;:PRINT USING"$$,###,###.##";L;P;B 4170 F = F + 1 4180 IF F = 20 THEN 4280 4190 IF N>C THEN 4150 4200 D=R+B 4230 PRINT "Last Payment was...";USING"$$,###,###.##";D 4240 INPUT "Do You Want to Run Another (Y/N)";Y$ 4250 IF LEFT$ (Y$,1) = "Y" THEN 3910 ELSE 40 4280 PRINT"TO CONTINUE STRIKE ANY KEY, ESC TO STOP" 4290 A$=INKEY$: IF A$="" THEN 4290 4300 IF A$=CHR$(27) THEN GOSUB 4370: GOTO 4240 4310 PRINT 4320 F = 0 4330 GOSUB 4370 4340 GOTO 4140 4370 CLS:RETURN 4380 CLS:RETURN 4390 REM 4500 CLS:PRINT D$;:RETURN 4510 PRINT D$;:LOCATE 23,1:PRINT D$;:RETURN 4999 STOP 5000 CLS:LOCATE 12,39:COLOR 16,7:PRINT"Bye":PLAY"C11D11E11D6E11C4":COLOR 7:LOCATE 23,1:END 8880 A=((T / P) ^ (1 / Y) - 1) * 100