C programme to find simple and compound interest




#include
#include
#include
void main()
{
float p,n,r,si,ci,a;
clrscr();
printf("Enter the values for P,N,R");
scanf("%f%f%f",&p,&n,&r);
si=p*n*r/100;
a=p*pow((1+r/100),n);
ci=a-p;
printf("Simple Interest = %f",si);
printf("\nCompount Interest = %f",ci);
getch();
}


Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: