Compound Interest Program in C
Interest on loans and deposits is compound interest. This is the most commonly used concept in everyday life. Compound interest on an amount is based on principal and interest earned over time. This is the main difference between simple interest and compound interest.
When you check your bank statement, you usually see interest credited to your account annually. This annual interest rate fluctuates around the same principal amount. You can see that the interest is increasing year by year. From this, we can conclude that bank interest is not net interest. See this article for the definition of compound interest and the formulas and derivations for calculating compound interest, such as annual, semi-annual, and quarterly.
Additionally, the examples presented here, based on real-world applications of compound interest, will help you understand why compound interest returns are higher than simple interest returns. The term "compound interest" refers to the original principal and the interest accrued over time, as previously stated. The formula for compound interest is as follows:
Amount minus principal = compound interest
The addition of interest to the principal of a loan or deposit is known as compound interest or compound interest Instead of paying interest. It is reinvested so that you will earn interest on the principal in the next period in addition to the interest already accumulated. Compound interest is common in economics and finance.
Compound interest has a compound interest, unlike simple interest, which does not add interest to the principal and does not compound interest.
Compound Interest Formula
The formula for compounding annual interest is:
Compound Interest = Amount - P (P is principal, R is the interest rate, T is period)
Pseudocode
Enter the principal sum. Store it in some factor, say head.
Time can be entered into a variable.
Some variable, such as rate, has an input rate.
Use the formula Amount = principal * (1 + rate / 100) time to determine the amount.
Utilize a formula to calculate compound interest.
At long last, print the resultant worth of CI.
How is Compound Interest Calculated?
The formula X=P[(1+i)*n-1] is used to find out how much interest a balance will earn in a compound interest environment where n is the number of compound interest, i is the nominal interest rate in decimals, and P is the principal The amount of interest added to the principal is X Consider the previous diagram again.
For example, a $100 loan for 3 years at 5% annual interest. This is what the formula looks like. Solving for X=100[(1+0.05)3-1], we find that the interest payments on the loan after three years total $115.76, or $15.76 per month. Note that using simple interest, the balance of this loan would be only $115.
Compound interest doesn't just apply to loans. It can also be applied to investments A metric called compound annual growth rate (CAGR) is used to determine the long-term return on investment in a compounding environment CAGR can be used to estimate the expected growth of an investment portfolio over time. This is useful when planning goals such as saving for retirement from college.
Additionally, it can be used to assess portfolio and fund manager performance relative to market returns For example, if a fund manager's total five-year return is 4% of his return, while the market's index return is 5% of his, the fund manager underperforms the market. increase. Similarly, if a manager returns 6%, it will outperform the market.
#include<stdio.h>
#include <math.h>
int main()
{
float PAmount, ROI, Time_Period, CIFuture, CI;
printf("\nPlease enter the Principal Amount : \n");
scanf("%f", &PAmount);
printf("Please Enter Rate Of Interest : \n");
scanf("%f", &ROI);
printf("Please Enter the Time Period in Years : \n");
scanf("%f", &Time_Period);
CIFuture = PAmount * (pow(( 1 + ROI/100), Time_Period));
CI = CIFuture - PAmount;
printf("\nFuture Compound Interest for Principal Amount %.2f is = %.2f", PAmount, CIFuture);
printf("\nCompound Interest for Principal Amount %.2f is = %.2f", PAmount, CI);
return 0;
}
Output:
Please enter the principal amount
200000
Please enter the rate of interest
2.5
Please enter the time period in years
7
The future Compound Interest for Principal Amount 200000.0 is 237737.11
Compound Interest for the Principal Amount of 200000.0 is 37737.11