Monday, August 1, 2016

SIMPLE INTEREST- C Program

/* SIMPLE INTEREST*/

#include<conio.h>
#include<stdio.h>
void main()
{
float p,r,t,si,ta;
clrscr();
printf("Enter the principal amount,rate of interest and time\n");
scanf("%f%f%f",&p,&r,&t);
si=(p*r*t)/100;
printf("The simple interest is %f",si);
ta=p+si;
printf(“Total amount after the desire period is %f”,ta);
getch();
}

/*OUTPUT
Enter the principal amount, rate of interest and time
1000
2
2
The simple interest is 40
Total amount after the desire period is 1040*/

No comments:

Post a Comment