Tuesday, 4 October 2016

Program to find Compound Interest .

#include<iostream.h>
#include<conio.h>
#include<math.h>
void main ()
{
clrscr();
int p,r,t,a,ci;
cout<<“Enter the Principal Amount ” ;
cin>>p;
cout<<“Enter rate “;
cin>>r;
cout<<“Enter time “;
cin>>t;
a=p*pow(1+r*0.01,t);
ci=a-p;
cout<<“Amount is “<<a<<“\n”;
cout<<“Compound Interest is “<<ci<<“\n”;
getch ();
}

No comments:

Post a Comment

Basic Implementation of Array as a Pointer

#include<iostream.h> #include<conio.h> void main() { clrscr();   int arr[5];   cout<<"Enter 5 nos. ";   f...