CGS-3460 Fall 2004
Assignment 2

(Financial Computing)


Due on: September 17,  2004.
Total points: 100

In 1627, Manhattan Island was sold to the Dutch settlers for approximately $24. If the proceeds of that sale had been deposited in a Dutch bank paying 5 percent interest, compounded annually, what would the principal balance be at the end of 2004? A display is required as follows: 

Balance as of December 31, 2004, is $xxxxx.

xxxxx is the amount calculated by your Fortran Program.

Format requirement: print only 2 decimal positions in your output, i.e., the output should be like XXXXX.XX.

Hint: Let µ be the interest rate, and D be the initial deposit amount. Then after N years, the amount A will be:

A = D * ( 1 + µ )N

 

BONUS (25 points)

You get a 25 points ponus if you turn in a second GENERALIZED version.

Instead of computing for a fixed interest rate, finxed number of years, and fixed initial deposit, the generalized program will ask the user to input the year of initial deposit, the year up to which calculation of the balance is required, the initial deposit, and the interest rate.

The program should verify that the input is valid, i.e., the calculation year is later than the deposit year, the initial deposit is not a negative number, and the interest rate is between 1% and 20%, inclusive. When all the inputs are valid, the program should display the result as in the original program.



Back to Main Page

© 2004 FSU Dept. of Computer Science