CIS 1033 - Fundamentals of Programming

Bob Comer, Professor, CIS/CSC


Programming Assignment 5 - Investment Maturity Value

Due Wednesday, June 30

This is basically program 3 on page 219-220 of your textbook. Write a C++ program to calculate and print the value of an investment at maturity. The program should read the investment amount (principal) and the investment period from the keyboard and print a table of maturity values for interest rates of 4%, 5%, 6%, and 7%. See your textbook for the formula.

Notes:

  1. You must do all input and output in the main function.
  2. You must use a loop in the main function.
  3. The formula should be calculated in a separate function.

Data for main() 

Variable

Description

years

period for the investment in years

rate

interest rate as a percent

principal

amount invested in dollars

 

Data for MaturityValue() 

Variable

Description

As needed

 

Sample Output
Your output should look like the example below. User input is shown in bold.
 

Enter investment amount: 1000
Enter period in years : 5

Interest Maturity
Rate Value
--------------------
4% 1216.65
5% 1276.28
6% 1338.22
7% 1402.55


Return to Fundamental's Home Page

Copyright: Ó1999 by the Austin Community College

Department of Computer Studies. All rights reserved.

Comments to: Bob Comer

Last updated: June 28, 1999