Computerese for beginners

Here's what a True BASIC (Beginners All-purpose Computer Instruction Code) computer program listing looks like. This program computes the growth of a $10,000 savings account earning 8.5 percent annual interest. It gives the balance of the account each year until the balance has doubled. (Statements following the exclamation marks serve as documentation for the programmer, and are ignored by the computer.) ! Compute interest on a bank account. ! Stop when the money has doubled. ! LET money = 10,000 ! Start with $10,000 LET original = money ! Remember that as original amount LET interest = 8.5/100 ! Interest is 8.5 percent DO until money [is greater than or equal to] 2 x original ! Loop until money doubles PRINT years, money ! Print year and money LET years = years + 1 ! Keep track of how long LET money = money + (interest x money) ! Add in interest LOOP PRINT ``In''; years ; ``years, you'll have $''; money END -- 30 --

About these ads
Sponsored Content by LockerDome

We want to hear, did we miss an angle we should have covered? Should we come back to this topic? Or just give us a rating for this story. We want to hear from you.

Loading...

Loading...

Loading...

Save for later

Save
Cancel

Saved ( of items)

This item has been saved to read later from any device.
Access saved items through your user name at the top of the page.

View Saved Items

OK

Failed to save

You reached the limit of 20 saved items.
Please visit following link to manage you saved items.

View Saved Items

OK

Failed to save

You have already saved this item.

View Saved Items

OK