Social Icons

Saturday, 15 February 2014

Program to find Compound Interest

#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
float a,p,r,t,ci;
clrscr();

cout<<"\n Enter Principle : ";
cin>>p;
cout<<"\n Enter Rate : ";
cin>>r;
cout<<"\n Enter Time : ";
cin>>t;
a=p*pow((1+r/100),t);
ci=a-p;
cout<<"\n"<<"\n\tCompound Interest is : "<<ci;
cout<<"\n\tTotal Amount after "<<t<<" years is : "<<a;
getch();
}

                                                         Output



No comments:

Post a Comment