|
- 5 CLS
- 10 PRINT "REGULAR WITHDRAWAL OF INVESTMENT"
- 20 PRINT
- 30 PRINT "THIS PROGRAM COMPUTES THE AMOUNT THAT CAN BE
- 40 PRINT "WITHDRAWN FROM AN INITIAL INVESTMENT,M TIMES
- 50 PRINT "PER YEAR FOR N YEARS,WITH NOTHING LEFT AT THE
- 60 PRINT "END OF N YEARS,IF THE NOMINAL INTEREST RATE IS
- 70 PRINT "GIVEN."
- 80 PRINT "THIS TYPE OF COMPUTATION SHOULD BE INTERESTING
- 85 PRINT "TO THOSE WHO WOULD LIKE TO KNOW HOW WELL THEY
- 87 PRINT "CAN LIVE FOR A FIXED NUMBER OF YEARS ON
- 90 PRINT "ACCUMULATED SAVINGS."
- 95 PRINT :INPUT "PRESS ENTER TO BEGIN";Z9
- 100 CLS
- 110 INPUT "AMOUNT OF INITIAL INVESTMENT";IPX
- 120 INPUT "NUMBER OF WITHDRAWALS PER YEAR";M
- 130 INPUT "NUMBER OF YEARS OF WITHDRAWALS ";N
- 140 INPUT "NOMINAL INTEREST RATE (%) ";IR
- 150 IR=IR/100
- 160 W=IPX*(IR/M/((1+IR/M)[(N*M)-1)+IR/M)
- 170 PRINT
- 180 F$(1)=" REGULAR WITHDRAWAL PERMITTED = $$#####.##"
- 190 PRINT USING F$(1);W
- 200 PRINT
- 210 INPUT "PRESS 0 TO END,1 TO START OVER,2 FOR NEW INTEREST RATE";Z9
- 220 IF Z9=1 THEN GOTO 100
- 230 IF Z9=0 THEN END
- 235 IF Z9=2 THEN PRINT :GOTO 140
- 240 PRINT "INPUT ERROR.TRY AGAIN.":PRINT :GOTO 210
|