## Write a C program to calculates the Simple Interest and Compound Interest. The Principal amount, Rate of interest and Time are entered through the keyboard:-

Here, we have to write a simple C program that calculates the Simple Interest and Compound Interest. The user will enter the Principal amount, Rate of interest, and Time.

### Formulae used:-

Simple interest=(p*r*t)/100

where, p= Principal amount

r= Rate of interest

t= Time of investment.

Compound interest= p*(1+r/100)^t (assumption taken only one-time interest got compounded annually)

## Explanation & Program code:-

We will ask the user to enter the value of the principal amount, rate of interest, and time of investment then we will store the entered value into the variables named p,r, and t respectively. Based on the entered radius value, we will calculate the simple interest and compound interest. To make the program code easier we have taken the assumption that only one-time interest gets compounded annually(in the question mentioned take the value of p, r, t from the user). Further details are mentioned as comments in the program code.

### Output:-

## Algorithm of the program to calculate Simple interest and compound interest:-

## Flowchart of the program to calculate the Simple interest and Compound interest:-

As you have reached the end of the article, so I hope as of now you have a clear understanding of the program, algorithm, and flowchart to calculate the Simple interest and compound interest. Please let me know your queries, suggestion, and feedback in the comment section.