Today we will learn C program to find simple interest. So before starting you should have a little bit of knowledge about Simple interest. So,

What is Simple Interest?

Simple Interest is a simple way of calculating the attention to get a loan/principal quantity. Easy interest is a theory that’s employed in the majority of the industries like finance, banking, automobile, etc.

Simple Interest (S.I) is the way of calculating the interest level for a principal sum of money. Have you ever made money from the siblings as soon as your pocket cash obtained drained? Or lent him possibly? You use that cash for the purpose you’d borrowed it in the first location.

Following that, you return the cash when you receive the following month’s pocket money from the parents. This is the way lending and borrowing work in your home.

But in the actual world, money isn’t free to borrow. During the revival, outside of the amount of the loan, you pay a bit more money that is dependent upon the amount of the loan in addition to the period for that you borrow.

This is known as simple interest. This expression finds extensive use in banking.

Simple Interest Formula:

Simple Interest Formula is Given as:

SI=(P x R x T) / 100

Where P=Principal R=Interest Rate in percentage and T=Time duration in years.

C Program to find Simple Interest

#include <stdio.h>
int main()
{ 
 float principle, rate, sinterest;
 int time;
 printf("Enter Principle Amount, Rate %% per Annum and Time\n");
 scanf ("%f %f %d", &principle, &rate, &time);
 sinterest = (principle * rate * time)/ 100.0;
 printf ("Principle Amount = %5.2f\n", principle);
 printf ("Rate %% per Annum   = %5.2f%\n", rate);
 printf ("Time   = %d years\n", time);
 printf ("Simple Interest  = %5.2f\n", sinterest);
}

Output:

simple interest program in c

Explanation:

This application will calculate the worth of the SI at which the principal, speed and the period are provided by the consumer. So to start with, you need to incorporate the stdio header document with the”include” previous # that informs the header file has to be procedure before compilation, thus termed preprocessor directive.

In Main Method:

Within the main() function you need to declare floating kind factors name’ principle’, ‘speed ‘,”sinterest’; Furthermore, you need to take the next integer type variable name’ period’.

We have included additional header file conio.h.

Currently, use printf() to show the message: “Input Principle Amount, Rate%per Annum and Time”. Afterwards, the scanf() method can be utilized which will require three values in the user and store it to factors – principal, time and rate.

Then based on this formulation of easy interest, the multiplicative worth of three i.e. (principal * rate * time) gets split with 100.0 and can be saved in the variable ‘sinterest’.

Then all of the four values i.e. main, speed and time together with the calculated price of easy interest become displayed using four printf() statements.

Also Read: