#include
long int d;
class bank
{
private:
long int e,c;
float amount;
char b,f;
public:
void deposit();
void withdrawn();
void menufunc();
};
void bank :: deposit()
{
cout<<"\n Total amount in your account is : Rs."<
d=d+c;
cout<<"\n Your total amount is : Rs."<
if(f=='y')
menufunc();
else
return;
}
void bank :: withdrawn()
{
cout<<"\n Your initial balance is : Rs."<
if (d>=e)
{
d=d-e;
cout<<"\n Amount withdrawn : Rs."<
if(f=='y')
menufunc();
else
return;
}
void bank :: menufunc()
{
cout<<"\nIf you want to deposit money in your account,press 'd'"; cout<<"\nIf you want to withdraw money from your account,press 'w'"; cout<<"\notherwise press 'e' to exit : "; cin>>b;
if(b=='d')
deposit();
else if (b=='w')
withdrawn();
else
return;
}
void main()
{
bank z;
char b,x;
clrscr();
cout<<"\n\t\t\t****Welcome to State Bank of Punjab****"; cout<<"\n Enter the amount in your account : Rs."; cin>>d;
z.menufunc();
getch();
}
No comments:
Post a Comment