12.07.2015 Views

page-1983-101-timex-sinclair-programming-tricks

page-1983-101-timex-sinclair-programming-tricks

page-1983-101-timex-sinclair-programming-tricks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

67 Money GrowsThis section of the book includes a number of programsrelating to household money management and tosmall-business applications. This first program showsyou how your money grows when deposited in a savingsaccount at a certain annual interest rate, compoundedmonthly.The program will have the computer ask for the initialamount of principal saved by depositing in the account.Then the annual interest rate and the number of monthsto be displayed. The result of the run is a display of thechanging principal as months pass and interest is addedon.Program Listing10 LET I=Jf20 PRINT nPRINCIPAL = $n;30 INPUT P40 PRINT P50 PRINT nANNUAL INTEREST RATE = n ,•60 INPUT R70 PRINT Rn.80 PRINT nNUMBER OF MONTHS ,90 INPUT M100 PRINT M110 FOR Q=l TO M120 LET I=(P*(O.Ol*R))/12130 LET P=P+I140 PRINT Q;n MONTH= $";P150 NEXT Q160 PRINT170 IF INKEY$=n" THEN GOTO 170180 CLS190 GOTO 1086

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!