home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
vol_300
/
333_02
/
p016.awk
< prev
next >
Wrap
Text File
|
1989-04-22
|
231b
|
10 lines
# interest2 - compute compound interest
# input: amount rate years
# output: compounded value at the end of each year
{
for (i = 1; i <= $3; i = i + 1)
printf("Year %d\t%.2f\n", i, $1 * (1 + $2) ^ i)
}