C program to find simple and compound interest

Problem statement

Write a program to calculate simple interest and compound interest.
Here we will take principle, time and rate of as input from user.

What is compound interest

The concept of compound interest is that interest is added back to the principal sum so that interest is earned on that added interest during the next compounding period.

The formula for calculating compound interest is:

= [P (1 + i)n] – P
= P [(1 + i)n – 1]

P = Principal,
i = annual interest rate in percentage terms,
n = number of compounding periods.

What is simple interest

Simple interest is a quick method of calculating the interest charge on a loan. Simple interest is determined by multiplying the daily interest rate by the principal by the number of days that elapse between payments.

The formula for calculating compound interest is:

Simple Interest = Interest Rate x Principal Balance

What is Principle

Principal is the money used to pay down the balance of the loan.
The principal is the amount you are borrowing, and the interest is the charge for the time you have the loan.

What is Interest

Interest is the charge paid to the lender for the privilege of borrowing the money.
Interest is calculated on the principal.

Program to calculate the interest


Help others by sharing the content!

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.