A Simple C++ Program That Evaluates A Simple And Compound Interest

Welcome. Please Login, Register, Or Activate! 
type your username and password to login
Date: November 23, 2009, 08:59 PM
431509 members and 298513 Topics
Latest Member: johnnyy2g
Nairaland [Nigerian Forum] Home Help Search Who is currently online? Login Register
Nairaland Forum  |  Technology  |  Programming  |  A Simple C++ Program That Evaluates A Simple And Compound Interest
Pages: (1) Go Down Send this topic Notify of replies
Author Topic: A Simple C++ Program That Evaluates A Simple And Compound Interest  (Read 1047 views)
maimodu
A Simple C++ Program That Evaluates A Simple And Compound Interest
« on: May 01, 2008, 05:51 PM »

A simple c++ financial management  program that evaluates a simple and compound interest
sbucareer (f)
Re: A Simple C++ Program That Evaluates A Simple And Compound Interest
« #1 on: May 01, 2008, 10:54 PM »


First let start by elaborating what is meant by compound interest. Compound interest is interest that is paid on both the principal and also on any interest from past years.

Therefore, It’s often used when someone reinvests any interest they gained back into the original investment. So, let take this formula as our benchmark

M = P( 1 + i )^n

M is the final amount including the principal.

P is the principal amount.

i is the rate of interest per year.

n is the number of years invested.

Let's say that I have £100, 000 to invest for 5 years at rate of 15% compound interest.

M = 100, 000 (1 + 0.15)^5 = £201 135.719.

You can see that my £100, 000 is worth £201,135.719.


So, you want to code this algorithm in progamming language like C++, I don't assume you want me to teach you C++. But if you want to learn C++ visit this Tutorial site

Ok!!!

//Declare some variables to hold these fields
int signed * finalPrincipalInterest;
int signed * principalAmount;
int unsigned short * interest;
int signed short *numberOfYears;


//Assign the variables data either through dynamic or static data initalization
*finalPrincipalInterest = *pow((&principalAmount *(1+&interest)),&numberOfYears);

This I hope can help you with your coursework.

 Need For More Programmers In Nigeria  Learning PHP And MySQL  Aptech Students  Page 2
Pages: (1) Go Up Send Topic to Friend by E-mail Reply 


Sections: Autos/Cars (2) Jobs/Vacancies (2) (3) Career Talk Education General(2) Politics Romance Computers Phones Travel
Sports Fashion Health Religion Celebrities TV/Movies (2) Music/Radio (2) Books Webmasters Programming

Links: Page1 Page2 Page3 Page4 Page5 Page6 Page7 Page8 Page9 Page10

Nairaland is owned by Oluwaseun Osewa. See also: Nairalist Classified Ads
Nairaland Forum | Powered by SMF 1.0.12.
© 2001-2005, Lewis Media. All Rights Reserved.