University of Calgary

Bank Interest

Bank Interest
source: Tino Duong, 2003 

Description

You have just inherited a large sum of money from a distant relative. Normally you would take that money and spend it frivolously; however, you have been convinced otherwise by friends to start investing your money for the future. So you have decided to take this inheritance, along with a certain percentage of your monthly paycheck and invest the money in a high interest account.

After speaking with many different banks and being quoted different rates, your head is spinning from all the different numbers. You decide to write a computer program that will help you decide with bank is offering the best deal.

Requirements

Write a program that will prompt the user for 

  1. Interest Rate
  2. Initial Amount
  3. Payment Amount (how much money you will add in monthly)
  4. Number of years

Taking this information, calculate the amount of interest that will be earned each year, displaying a monthly report of your investments.

For example, interest rate = .08 (8 percent), initial amount =$100, payment amount = 10/month, number of years =2

OUTPUT:

yrs month balance
0   0         $100.00
0   1         $110.67
0   2         $121.40
0   3         $132.21
0   4         $143.10
.
.
.

yrs month balance
1   0         $232.80
1   1         $244.35
1   2         $255.98
1   3         $267.69
1   4         $279.47
1   5         $291.33
.
.
1   11        $364.19

Additional/Optional Requirements

Concepts

Keyboard Input/Output
Looping Structures



Updated: August 31, 2005 03:27 PM