ChipMaster's bwBASIC This also includes history going back to v2.10. *WARN* some binary files might have been corrupted by CRLF.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

31 lines
1.1 KiB

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