Then the user is (repeatedly) asked to enter a transaction type:
What would you like to do? 1 - deposit 2 - withdrawal 3 - balance inquiry 4 - quitIf the user enters anything else than 1,2,3,4 the program should print:
This is not a valid option. Try again. What would you like to do? 1 - deposit 2 - withdrawal 3 - balance inquiry 4 - quit
If the user presses 1, the program should further ask for the deposit amount and call a function to update the balance.
If the user presses 2, the program should further ask for the withdrawal amount and call a function to update the balance.
If the user presses 3, the progam should call a function to display the current balance.
If the user presses 4, the program should print the final balance, say Good Bye, and quit. Otherwise it should go back to asking th euser to enter a transaction type.
Structure your program so that the main function looks as follows:
int main() { int option = 0; //some dummy initial value float balance; //ask for initial balance; initializeBalance(balance); while (option != 4) { option = getOption();//this function should make sure the option is valid if (option == 1) {...}; if (option == 2) {...}; if (option == 3) {...}; if (option == 4) {...}; } return 0; }What functions do you need to write, and what are their parameters? Do you need to pass them by value or by reference?