Monday, May 23, 2016

A program for calculating simple interest

Program
#include<stdio.h>
main()
{
int p,t,r;
float si;
printf("enter the values of p,t,r: \n");
scanf("%d%d%d",&p,&t,&r);
si=(p*t*r)/100;
printf("simple interest is :%f",s);
}

Output
 enter the values of p,t,r
20 30 40
simple interest is:240.000000

No comments:

Post a Comment