source file name: simpint.c
void main()
{
long P,N,R;
long SI;
clrscr();
printf("\n enter deposited Amount(P) , rate (R) and no. of years(N): ");
scanf("%ld%ld%ld",&P,&N,&R);
SI=(P*N*R)/100;
printf("\n Simple interest=Rs.%ld ",SI);
getch();
}
Output:
1. enter deposited Amount(P) , rate (R) and no. of years(N):
20000 5 3
Simple interest=Rs. 3000
2. enter deposited Amount(P) , rate (R) and no. of years(N):
25000 7 4
Simple interest=Rs. 7000
0 Comments
Post a Comment