# Write A Program To Calculate Simple Interest In C++

- Write A Program In C++ To Calculate The Simple Interest Of An Amount Given By The User
- How To Write C++ Program

Write a program which accept principle, rate and time from user and print the simple interest. The formula to calculate simple interest is: simple interest = principle x rate x time / 100. Simple interest is money you can earn by initially investing some money (the principal). A percentage (the interest) of the principal is added to the principal, making your initial investment grow! This simple interest calculator calculates an accrued amount that includes principal plus interest. In this program, variable amount is going to be used to store principal amount, rate is going to used to store interest rate and time is going to be used to store time and si is going to be used to store simple interest. Formula to calculate simple interest: (principal x rate x time )/100. C program for Simple Interest. Program description:- Write a program to calculate simple interest by accepting the principle amount, time and rate values. The simple interest is given by ( principal amount. time. rate )/ 100. We can take variables name as p, t, and r for the principal amount, time, and rate respectively for a better understanding purpose.

### Overview:

Let us learn how to calculate simple interest in C programming language. Simple interest is basically a quick and easy calculation of the interest charged on a given principal amount. Before going to write the c program to Calculate Simple Interest, let's understand What is Interest?, What are the types of Interest?, and What is Simple Interest? Moreover, I will show How to calculate Simple Interest? and define P, R and T in a simple interest formula. Furthermore, I will demonstrate the logic to calculate Simple Interest. After all, I will write a logic and C program to Calculate Simple Interest with output.

### Table of contents:

- What is Interest?
- What are the types of Interest?
- What is Simple Interest?
- How to calculate Simple Interest?
- What is Principal amount?
- What is rate of Interest?
- What do you mean by time in Simple Interest formula?
- Demonstration to calculate simple interest
- Logic to calculate simple interest
- C Program to Calculate Simple Interest with output
- Conclusion

### What is Interest?

Interest is the extra money that the borrower pays for using the lender’s money. When a person lends money to a borrower, the borrower usually has to pay an extra amount of money to the lender. This extra money is what we call the interest. In other words, If you deposit money in a bank, interest is the money that you earn, as a percentage of your deposit.

### What are the types of Interest?

There are three types of Interest as follows:

### What is Simple Interest?

Simple Interest (S.I) is the method of calculating the interest amount for some principal amount of money. In other words, Simple Interest is the rate at which we lend or borrow money.

### How to calculate Simple Interest?

Simple interest formula calculated by following Simple Interest formula:

*Simple Interest = (Principal Amount × Rate of Interest × Number of years) / 100 *

or

* SI = (P × R × T)/100 *

Where,

SI is the Simple Interest

P is the principle amount

T is the time period for which money is invested

R is the rate of interest

### What is Principal amount?

It is a starting amount of money. In the context of borrowing, principal is the initial size of a loan; it can also be the amount still owed on a loan.

### What is rate of Interest?

The interest rate is the amount a lender charges for the use of assets expressed as a percentage of the principal. It is the interest rate per year.

## Write A Program In C++ To Calculate The Simple Interest Of An Amount Given By The User

### What do you mean by T in Simple Interest formula?

T is the time period for which money is invested or borrowed.

### Demonstration to calculate simple interest

To calculate simple interest we will take help of this formula:

You can understand it from the following example:

**Question:**Calculate the Simple Interest if the principal amount is Rs. 2000, the time period is 1 year and the rate is 10%.

**Solution:**According to the formula of simple interest we have,

S.I. = [(Principal (P) × Time (T) × Rate (r)) / 100]

So, from the above values,

## How To Write C++ Program

S.I. = [(2000 × 1 × 10)] / 100 = 20000/100 =200

So, the simple interest at the end of 1 year will be Rs. 200.

### Logic to calculate simple interest

**Step 1:**Input principal amount in some variable say principle.**Step 2:**Input time in some variable say time.**Step 3:**Input rate in some variable say rate.**Step 4:**Find simple interest using formula SI = (principle * time * rate) / 100.**Step 5:**Finally, print the resultant value of SI.

### C Program to Calculate Simple Interest

When the above code is executed, it produces the following results:

Enter the principal amount: 12

Enter time: 2

Enter rate: 3

Simple Interest = 0.720000

This C program allows the user to enter the Principal Amount, Rate of Interest, and the Number of years. By using those values, this C Program will calculate the Simple Interest using following formula: Simple Interest = (Principal Amount * Rate of Interest * Number of years) / 100.

#### Related Questions

Please Loginor Registerto leave a response.

Never Miss an Articles from us.## Related Articles

#### C Program to convert Decimal to Binary Number

A Decimal Number is constructed with any digit from 0 to 9. For instance, 24 is a Decimal Number constructed from the digits 2 and 4. A Binary Number is constructed with digits 0 and 1. For instance, ..#### C program to reverse a string

This program reversed the entered string that means opposite of the previous string sequence...#### C program to reverse an Integer number

Are you want a demonstration of The C Program that reverses an Integer number? This Program reversing the sequence of digits in an Integer.After the successful compilation of the program, a message..