Answer:
See explaination
Explanation:
#include <iomanip>
#include <string>
#include <fstream>
using namespace std;
void getName(string);
void getPin(int,int);
void displayMenu(int);
string name;
int pin1, pin2, ch ;
int main()
{
cout << fixed << showpoint << setprecision(2);
getName(name);
getPin(pin1,pin2);
displayMenu(ch );
system("pause");
}
void getName(string name)
{
cout << "Enter your name: ";
cin >> name;
if (name = "AXBY") || (name != "ABGSHY"))
{
getName(name);
}
}
void getPin(int pin1, int pin2)
{
string name;
if (name == "AXBY")
{
cout << "Please Enter Pin: ";
cin >> pin1;
if (pin1 != 4433)
{
cout << "Pin incorrect please try again!";
cin >> pin1;
}
}
if (name == "ABGSHY")
{
cout << "Please Enter Pin: ";
cin >> pin2;
if (pin2 != 2849)
{
cout << "Pin incorrect please try again!";
cin >> pin2;
}
}
}
void displayMenu(int ch )
{
cout << "[1] Check your account Balance\n"
"[2] Withdraw funds\n"
"[3] Deposit funds\n"
"Please Enter Choice: ";
cin >> ch ;
if (ch != 1 || ch != 2 || ch != 3)
{
cout << "Choice is incorrect, enter choice now: ";
cin >> ch ;
}
}