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

A Member? Please Login  
type your username and password to login
Date: May 16, 2008, 04:27 PM
201192 members and 113369 Topics
Latest Member: kabiyesi76
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 66 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 (m)
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.

  Microsoft Introduces Applications In Three Nigerian Languages  Project Topic  Best IT Jobs In Africa Here  Page 2
Pages: (1) Go Up Send Topic to Friend by E-mail Reply 
Google
 
Web www.nairaland.com
Sections: TV/Movies (2) Music/Radio (2) Celebrities Jobs (2) Career Romance Books Politics Sports Fashion Travel
Health Schooling Religion General(2) Business Webmaster Programming Computers Phones Cars & Trucks

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

Nairaland is owned by Oluwaseun Osewa
Powered by: SMF, © 2001-2005, Lewis Media. All Rights Reserved.