Answer to Question #270492 in C++ for Kelvin

Question #270492

Develop a C++ Application for Compound Interest Calculations. A person invests $1000.00 in a savings account yielding 5 percent interest. Assuming that all interest is left on deposit in the account, calculate and print the amount of money in the account at the end of each year for 10 years. Use the following formula for determining these amounts: a = p ( 1 + r )n where p is the original amount invested (i.e., the principal), r is the annual interest rate, n is the number of years and a is the amount on deposit at the end of the n th year.


1
Expert's answer
2021-11-24T00:43:37-0500
#include<iostream>
#include<cmath>
using namespace std;
int main(){
	double  p = 1000.00;
	double rate = 0.05;
	double n  = 10;
	double amount  = p * pow((1 + rate ), n);
	cout<<"Amount is: "<<amount<<endl;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS