Professional Documents
Culture Documents
AIM
To write a C program for calculating Simple Interest.
ALGORITHM
1. Start
2. Read two input for principle(p), Number of years(n) and Rate of Interest(r )
3. Calculate Simple Interest si=(p*n*r/100)
#include<stdio.h>
int main( )
{
float p,n,r,si;
clrscr();
printf(Enter principle, Number of years and Rate of Interest :\n);
scanf(%f%f%f,&p,&n,&r);
si=(p*n*r/100);
printf(The Simple Interest is : %2.2f: ,si);
return 0;
}
OUTPUT:-
RESULT:
Thus the C program for calculating Simple Interest has been executed successfully.