You are on page 1of 2

EX.

NO: 2a PROGRAM TO PRINT SIMPLE INTEREST


DATE: 3/8/2016

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)

4. Display Simple Interest(si)


5. Stop
PROGRAM:

#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.

You might also like