Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,153,226 members, 7,818,770 topics. Date: Monday, 06 May 2024 at 01:40 AM |
Nairaland Forum / Science/Technology / Programming / A Simple C++ Program That Evaluates A Simple And Compound Interest (5970 Views)
[source Code] A Program That Solves A Transportation Problem - By Frank UMEADI / Simple C-codes That Still Confuse Me / How To Make A Simple Calculator In Notepad Using .bat Format (2) (3) (4)
(1) (Reply)
A Simple C++ Program That Evaluates A Simple And Compound Interest by maimodu: 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)
Aspiring Data Scientist. / Calculating Nse's All Share Index And Market Capitalisation / Are You A Software Developer Or Software Companies With Beta Solution?
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 6 |