₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,155 members, 8,420,594 topics. Date: Friday, 05 June 2026 at 06:16 AM

Toggle theme

A Simple C++ Program That Evaluates A Simple And Compound Interest - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingA Simple C++ Program That Evaluates A Simple And Compound Interest (6083 Views)

1 Reply

A Simple C++ Program That Evaluates A Simple And Compound Interest by maimodu(op): 5:51pm On May 01, 2008
A simple c++ financial management program that evaluates a simple and compound interest
Re: A Simple C++ Program That Evaluates A Simple And Compound Interest by sbucareer(f): 10:54pm On May 01, 2008

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.
1 Reply

[source Code] A Program That Solves A Transportation Problem - By Frank UMEADISimple C-codes That Still Confuse MeHow To Make A Simple Calculator In Notepad Using .bat Format234

Storage Bindings Of VariablesBest Training Centre In Lagos(urgent Please)How Long Did It Take U'all To Learn Programming? 10 Years?