Simple Interest= (Principal*Rate*Time)/100
#include<stdio.h>
#include<conio.h>
void main()
{
int p, r, t, S.I;
clrscr();
printf("Enter principal, rate and time:");
scanf("%d%d%d", &p, &r, &t);
S.I= (p*r*t)/100;
printf("Simple Interest= %d", S.I);
}
Here, I have not inclued getch() function, which holds the output screen. to see the output screen, press alt+F5.
0 Comments