//Program to calculate the simple interest and compound interest.
#include<stdio.h>
#include<conio.h>
#include<math.h>
main()
{
float p,r,t,si,ci;
clrscr();
printf("Enter the value of Principle,Rate,Time:");
scanf("%f%f%f",&p,&r,&t);
si=(p*r*t)/100;
ci=p*pow((1+r/100),t)-p;
printf("\n Simple interest is=%f",si);
printf("\n Compound interest is=%f",ci);
getch();
}
#include<stdio.h>
#include<conio.h>
#include<math.h>
main()
{
float p,r,t,si,ci;
clrscr();
printf("Enter the value of Principle,Rate,Time:");
scanf("%f%f%f",&p,&r,&t);
si=(p*r*t)/100;
ci=p*pow((1+r/100),t)-p;
printf("\n Simple interest is=%f",si);
printf("\n Compound interest is=%f",ci);
getch();
}