Program To Enter Bank Details in implement
#include<iostream.h>
#include<conio.h>
#include<process.h>
class member
{
protected:
int dp,wd,bal,amt;
public:
void putdata();
int amount();
int deposite();
int withdraw();
int balance();
};
void member::putdata()
{
cout<<"\n Enter The Amount : ";
cin>>amt;
cout<<"\n Enter The Deposite Amount: ";
cin>>dp;
cout<<"\n Enter The Withdraw Amount: ";
cin>>wd;
}
int member::amount()
{
return amt;
}
int member::deposite()
{
return dp;
}
int member::withdraw()
{
return wd;
}
int member::balance()
{
return amt+dp-wd;
}
void main()
{
int ch,s;
clrscr();
member m;
m.putdata();
cout<<"\n 1.Amount: \n 2.Deposite: \n 3.Withdraw: \n 4.Balance: \n 5.Exit:";
mahi:
cout<<"\n\n Enter The Choice: ";
cin>>ch;
switch(ch)
{
case 1:
s=m.amount();
cout<<"\n Amount= "<<s;
goto mahi;
case 2:
s=m.deposite();
cout<<"\n Deposite= "<<s;
goto mahi;
case 3:
s=m.withdraw();
cout<<"\n Withdraw= "<<s;
goto mahi;
case 4:
s=m.balance();
cout<<"\n Balance= "<<s;
goto mahi;
case 5:
exit(0);
default:
cout<<"\n Abe Dekhke Number Choose Karna \n";
goto mahi;
}
getch();
}
Here Is The Output :)
No comments:
Post a Comment