C Program to find the simple interest


In this tutorial we will create a c program to calculate simple interest. We are solving this prograom without using any function.
Simple interest you can find by using this formula that is
si = (pamt* r * t) /100
Where,
pamt is -principle amount
r- Rate is
t - Time is

C Program to find the simple interest

#include<stdio.h> int main() { int amt, r, t, si; printf("\n Enter Principal Amount : "); scanf("%d", &amt); printf("\n Enter Rate of Interest : "); scanf("%d", &r); printf("\n Enter Period of Time : "); scanf("%d", &t); si = (amt * r * t) / 100; printf("\n Simple Interest : %d", si); return 0; }

Output:-

Enter Principal Amount : 100
Enter Rate of Interest : 2
Enter Period of Time : 3
Simple Interest : 60

Explanation of Program :

In this program, We are finding the simple interest by using the formula of simple interest. You can understand by given below diagram.
amt = 100 for principle amount
r=3 for Interest
t=3 for Time
si=amt*r*t/100;
Now si will provide the result of simple interest.