June 2005
Beginner
480 pages
10h 31m
English
For this exercise, you're going to perform a compound interest calculation. This program will calculate the interest on a savings account, given some information about interest rates, deposits, and time. The formula you're going to use is as follows:

Using your text editor, type the program from Listing 2.2 and save it as Interest. Do not type in the line numbers. Make the program executable according to the instructions you learned in Hour 1.
When you're done, try running the program by typing the following at a command line:
perl Interest
Listing 2.3 shows a sample of the Interest program's output.
Read now
Unlock full access