Hello to all code gurus! First of, I wouldn't lie, i am not a professional programmer.....I am more of the opposite. I was given a program to write during a 4 day C++ programmers boot camp that I signed up for (which ended friday actually). By profession am a graphic designer and a rising web developer, specializing in all of the adobe an corel suites, except for a adobe indesign which I find not so helpfull at times. I want to see how the code I was given on one of the handouts could be implemented into a fully functional program for my personal use. I would like to see what functions, arrays an system calls you guys would use to get this done. Here is the question below:

Read in three values representing respectively:
a capital sum (integer number of pence),
a rate of interest in percent (float),
and a number of years (integer).
Compute the values of the capital sum with compound interest added over the given period of years.
Each year's interest is calculated as
interest = capital * interest_rate / 100;
and is added to the capital sum by
capital += interest;
Print out money values as pounds (pence / 100.0) accurate to two decimal places.
Print out a floating value for the value with compound interest for each year up to the end of the period.
Print output year by year in a form such as:
Original sum 30000.00 at 12.5 percent for 20 years
Year Interest Sum

1 3750.00 33750.00
2 4218.75 37968.75
3 4746.09 42714.84
4 5339.35 48054.19
5 6006.77 54060.96
6 6757.62 60818.58
7 7602.32 68420.90
8 8552.61 76973.51
9 9621.68 86595.19
10 10824.39 97419.58

7 Years
Discussion Span
Last Post by jonsca

Wow, more power to you for taking up C++ in only 4 days. I realize this might not be homework for you but it might make us feel better either way if you took a shot at it yourself first. Even a blend of pseudocode (the beginnings of which you have from the assignment) and laying out the code that you do know would be a plus. This way you get to test out what you learned from your class too!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.