switch(option)
{
case '1': cout<<"\n----DEPOSIT-----"<<endl;
cout<<"\nEnter Amount You want to Deposit: "; cin>>amount;
system("pause");
cout<<endl<<"Transaction Has Done!!"<<endl;
balance=balance+amount;
cout<<"You Have: "; cout<<balance;
cout<<"\n----------------"<<endl;
cout<<"Do You Wish Transact More or Exit? (y/n): "; cin>>yn;
if(yn=='y') goto step1;
else if(yn=='n') cout<<"\nTHANK YOU FOR USING OUR MACHINE!!"; return 0;
case'2': cout<<"\n------Withdraw------"<<endl;
cout<<"Enter Amount You Want to Withdraw: "; cin>>withdraw;
if(withdraw>>balance)
{
cout<<"Sorry, you don't have enough balance to transact"<<endl;
system("pause");
system("cls");
goto step1;
}
system("pause");
cout << "Enter pin: ";
ch = _getch();
while(ch != 13)
{
pin.push_back(ch);
cout << '*';
ch = _getch();
}
if(pin == pinc)
{
cout << "\nAccess granted :P\n"; goto step2;
}
else
{
cout << "\nAccess aborted...\n"; system("pause"); goto step1;
}
step2:
cout<<endl<<"Transaction Has Done!!"<<endl;
balance=balance-withdraw;
cout<<"Your Remaining Balance is: "; cout<<balance;
cout<<"\n----------------"<<endl;
cout<<"Do You Wish Transact More? (y/n): "; cin>>yn;
if(yn=='y') goto step1;
else if(yn=='n') cout<<"\nTHANK YOU FOR USING OUR MACHINE!!"; return 0;
case '3': cout<<"\n-------BALANCE INQUIRY-------"<<endl;
cout<<"You Have: "<<balance;
cout<<"\n-----------------------------";
cout<<"\nDo You Wish Transact More or Exit? (y/n): "; cin>>yn;
if(yn=='y') goto step1;
else return 0;
case '4':cout<<"\n--------EXIT--------";
cout<<"\nThank You For Using Our Bank!!!";
cout<<"\nRemoving Card....."<<endl;
system("pause");
return 0;