#include<iostream.h>
#include<conio.h>
#include<math.h>
class ci
{
private:
float x,y,z;
public:
void getdata(float p,float r,float n)
{
x=p;
y=r;
z=n;
}
void display()
{
float w,t;
w=x*pow((1+y/100),z);
t=w-x;
cout<<"show the result="<<w;
cout<<"\ncompound interest of the result="<<t;
}
};
main()
{
ci a1;
clrscr();
float p,n,r;
cout<<"enter the RADIOUS number=";
cin>>r;
cout<<"enter the p number=";
cin>>p;
cout<<"enter the time number=";
cin>>n;
a1. getdata(p,r,n);
a1. display();
getch();
}
No comments:
Post a Comment