Pages

Wednesday, November 30, 2011

C Programming to calculate simple intrest

/*to calculate simple intrest*/
#include<stdio.h>
#include<stdlib.h>
int main()
{
    float p,t,r,SI;
    printf("enter the principle amount: ");
    scanf("%f",&p);
    printf("enter the time: ");
    scanf("%f",&t);
    printf("enter the rate of intrest: ");
    scanf("%f",&r);
    SI=p*t*r/100;
    printf("the value of Simple Intrest=%f",SI);
    system("pause");
    return 0;
}

No comments:

Post a Comment