Saturday, August 20, 2011

Program to calculate the simple interest and compound interest.

//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();
}

Previous Next Home
0 Comments
Comments

Leave a Comment

:)) ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* :| 8-} :)] ~x( :-t b-( :-L x( =))

Twitter Delicious Facebook Favorites More