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.
 
 
 
 
 
 

38 lines
1.3 KiB

  1. 5 CLS
  2. 10 PRINT " FUTURE VALUE OF AN INVESTMENT"
  3. 20 PRINT
  4. 30 PRINT "THIS PROGRAM GIVES THE FUTURE VALUE OF AN INVESTMENT KEPT
  5. 40 PRINT "FOR N PERIODS WITH INTEREST COMPOUNDED AT A RATE OF
  6. 50 PRINT "I % PER PERIOD. THE INPUT NEEDED TO RUN THE PROGRAM IS
  7. 60 PRINT "THE AMOUNT OF THE INVESTMENT, THE INTEREST RATE (AS A PER CENT)
  8. 70 PRINT "AND THE NUMBER OF PERIODS. IF DATA IS ANNUAL WITH FIXED
  9. 75 PRINT"NUMBER OF COMPOUNDINGS THEN PROGRAM WILL COMPUTE THE INTEREST
  10. 77 PRINT"RATE PER PERIOD.
  11. 80 PRINT
  12. 90 INPUT "PRESS ENTER TO BEGIN";Z9
  13. 100 CLS
  14. 105 INPUT"IS INTEREST RATE QUOTED ANNUALLY WITH COMPOUNDING(Y/N)";Z9$
  15. 106 IF Z9$<>"Y" AND Z9$<>"N" THEN PRINT "INPUT ERROR!":GOTO 105
  16. 108 IF Z9$="Y" THEN GOSUB 500
  17. 110 PRINT @ 254," "
  18. 120 INPUT "AMOUNT OF INVESTMENT ";A
  19. 130 INPUT "INTEREST RATE PER PERIOD: ";I
  20. 135 I=I/100
  21. 140 INPUT "NUMBER OF PERIODS:";N
  22. 150 FV= A*(1+I)[N
  23. 160 PRINT
  24. 170 PRINT "FUTURE VALUE = ";FV
  25. 200 PRINT
  26. 220 INPUT"PRESS 1 FOR MORE TRIALS, 0 TO END";Z8
  27. 230 IF Z8=1 GOTO 100
  28. 240 IF Z8=0 THEN END
  29. 250 PRINT "INPUT ERROR. TRY AGAIN."
  30. 260 FOR L=1 TO 300:NEXT L
  31. 270 GOTO 220
  32. 500 REM COMPUTATION FOR ANNUAL DATA
  33. 510 PRINT:INPUT"ANNUAL INTEREST RATE IN %";I1
  34. 520 INPUT"NUMBER OF COMPOUNDINGS ANNUALLY";N1
  35. 530 I=I1/N1
  36. 540 PRINT:PRINT"INTEREST RATE PER PERIOD = ";I;"%"
  37. 550 FOR J=1 TO 1000:NEXT :CLS:RETURN