C program to find Simple interest.
Hey, learners Today I give you a c program to find the Simple Interest. Must practise this code at your own and don't only copy paste the code, try to write code at your own.
#include <stdio.h>
#include <conio.h>
int main()
{
int p,t;
float r,si;
clrscr();
printf ("Enter Principal:");
scanf ("%d", &p);
printf("Enter Rate:");
scanf ("%f", &r);
printf ("Enter Time:");
scanf ("%d", &t);
si=p*r*t/100;
printf ("Simple Interest: %f",si);
getch();
}
Output:-
Enter Principal: 1000
Enter Rate: 5
Enter Time: 3
Simple Interest: 150
Simple Interest formula
SI= P*R*T/100
where,
P is the principal amount
T is the time
R is the rate
I write this code in Turbo C you can use any other software to code.
Reason why I use Turbo C:
I use Turbo C because it is easy to setup and easy to use. If you are a beginner OR learner of C programming language then you must have to use Turbo C at first.
Comments