Académique Documents
Professionnel Documents
Culture Documents
#include<stdlib.h>
#include<stdio.h>
#include<conio.h>
#include<string.h>
#include<cctype>
#include<iomanip>
class Account
{
protected:
char name[30];
int ano;
char type;
public:
Account(){}
};
};
};
int main()
{
system("cls");
int ans;
while(1)
{
system("cls");
char c;
char acname[30];
int acno;
char atype;
cout<<"\nACCOUNT OPENING SYSTEM ";
fflush(stdin);
cout<<"\n\nENTER THE CUSTOMER NAME: ";
gets(acname);
cout<<"\nENTER THE ACCOUNT NUMBER: ";
cin>>acno;
int ch;
while(1)
{
if(atype=='S')
{
Saving_Account s1;
s1.getdata(acname,acno,atype);
while(1)
{
system("cls");
cout<<"\n\tSAVINGS ACCOUNT MENU";
cout<<"\n\n1. DEPOSIT";
cout<<"\n2. WITHDRAW";
cout<<"\n3. COMPUTE INTEREST";
cout<<"\n4. DISPLAY BALANCE";
cout<<"\n5. EXIT";
cout<<"\n\nENTER YOUR CHOICE: ";
cin>>ch;
if(ch==1)
s1.sdeposit();
else if(ch==2)
s1.swithdraw();
else if(ch==3)
s1.interest();
else if(ch==4)
s1.display_balance();
else if(ch==5)
{
s1.display_balance();
break;
}
else
{
cout<<"\n\nINVALID CHOICE";
continue;
}
}
else if(atype=='C')
{
Current_Account c1;
c1.getdata(acname,acno,atype);
while(1)
{
system("cls");
cout<<"\n\tCURRENT ACCOUNT MENU";
cout<<"\n\n1. DEPOSIT";
cout<<"\n2. WITHDRAW";
cout<<"\n3. PENALTY CHECK";
cout<<"\n4. DISPLAY BALANCE";
cout<<"\n5. EXIT";
cout<<"\n\nENTER YOUR CHOICE: ";
cin>>ch;
if(ch==1)
c1.cdeposit();
else if(ch==2)
c1.cwithdraw();
else if(ch==3)
c1.penalty();
else if(ch==4)
c1.display_balance();
else if(ch==5)
{
c1.display_balance();
break;
}
else
{
cout<<"\n\nINVALID CHOICE";
continue;
}
}
}
else
{
cout<<"\nINVALID CHOICE";
}
while(1)
{
cout<<"\n\nDO YOU WANT TO CONTINUE(1 FOR YES/2 FOR NO) :";
cin>>ans;
if(ans==1)
break;
else if(ans==2)
break;
else continue;
}
if(ans==1)
break;
else break;
}
if(ans==1)
continue;
else if(ans==2)
break;
}
return 0;
}