Thursday, January 20, 2011

This program calculates the Simple Interest for 3 different values of P, N, R. This program makes use of the For Loop, which is by far the most efficient loop used in C Programming

main()
{

int p, n, count;
float r, si;

for (count=1;count<=3;count++)

{
printf ("Enter the values of p, n and r:");
scanf ("%d %d %f", &p, &n, &r);

si = p*n*r / 100 ;

printf ("Simple Interest = Rs. %f\n", si);
}

}

No comments:

Post a Comment