Home / Programs / Program to find the simple interest.
Programming Example

Program to find the simple interest.

👁 6,262 Views
💻 Practical Program
📘 Step by Step Learning

In this program you will learn how to find the simple interest. Lets first understand the concept of simple interest then we will write our code.

Information & Algorithm

  • The initial money borrowed or lent out for a certain period is called the Principal (P).
  • The extra money paid for using others money is called Interest.
  • The total money paid back to the lender at the end of the time period (T) for which the principal is borrowed is called an amount (A).
  • The rate at which the interest has to be paid per annum is called rate of interest (R).
Program to find the simple interest.

Program Code

#include"stdio.h"
void main()
{
// variable declaration
int p,r,t,si; 

// take values from user

printf("enter principle, Rate of interest & time to find simple interest:\n ");
scanf("%d%d%d",&p,&r,&t);

// Calculate simple interest
si=(p*r*t)/100;

// Print result
printf("simple intrest= %d\n",si);

}

Output

enter principle, Rate of interest & time to find simple interest:
 1000 8 2
simple intrest= 160
Press any key to continue . . .

How to learn from this program

First read the algorithm, then study the program code line by line. After that, compare the code with the output and finally go through the explanation. This approach helps learners understand both the logic and the implementation properly.