14. Compound Interest When a bank account pays compound interest, it pays intere
ID: 3887062 • Letter: 1
Question
14. Compound Interest When a bank account pays compound interest, it pays interest not only on the principai amount that was deposited into the account, but also on the interest that has accumulatsd over time. Suppose you want to deposit some money into a savings account, and let the account earn compound interest for a certain number of years. The formula for calculating the balance of the account after a specified number of years is: A=P(1 + r)nt 1n The terms in the formula are: A is the amount of money in the account after the specified number of years. P is the principal amount that was originally deposited into the account. r is the annual interest rate. n is the number of times per year that the interest is compounded. t is the specified number of years.Explanation / Answer
#include<stdio.h>
#include<math.h>
main()
{
float p,t,n,A,r;
printf("Enter the amount:");scanf("%f",&p);
printf("Enter the intrest rate:");scanf("%f",&r);
r=r/100;
printf("Enter the number of times compunded per year:");scanf("%f",&n);
printf("Enter the time in years:");scanf("%f",&t);
float x,y,z;
x=n*t;
y=1+(r/n);
z=pow(y,x);
A=p*z;
printf("%f ",A);printf("%f ",z);
}
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.