facebook like button

26 March, 2011

program 11: Finding simple interest

The need:
     There was no special purpose of this program except for calculating simple interest. I wrote this program just to practice some more. That is why I'll not explain anything in this program. First try to  write program yourself based on previous posts. In case of any difficulty try to understand the below code on your own.

The code:
-------------------------------------------
/*a program for simple interest */
#include<stdio.h>
main()
{
    float i,j,k,si;
    printf("To calculate simple interest enter \np=");
    scanf ("%f",&i);
    printf("r=");
    scanf ("%f",&j);
    printf("n=");
    scanf ("%f",&k);
    si = i*j*k/100;
    printf("\nSimple interest =%.2f\n\n\n",si);
}
-------------------------------------------

No comments:

Post a Comment

feel free to ask your doubts... if any
you can post your doubts on
www.facebook.com/programsimply