Ok this is what I have so far. I've compiled my code and the menu system ran perfectly.
Code:
#include <stdio.h>
#include <math.h>
#include <ctype.h>
// Displays the list of options available
//prompts for the user’s selection and sets the value of the selection
void mainMenu(int *option);
//Asks the user if they want another transaction
void Keepgoing(char *goagain);
//Asks the user which type of account they would like to access and sets the
//value of the selection
void AccountMenu( char *acctType);
//Prompts the user for the amount of deposit and updates the selected account
void MakeDeposit( double *balance);
//Prompts the user for the amount of the withdrawal, determines if there are
//sufficient funds and updates the selected account if funds are dispensed
void MakeWithdrawal( double *balance, char acctType);
//Displays the user’s current account balance for the selected account
void GetBalance( double balance);
int main()
{
int choice;
char again,
account;
mainMenu(&choice);
AccountMenu(&account);
Keepgoing(&again);
return 0;
}
void mainMenu(int *option)
{
printf("Welcome to Regional South Bank.\n\n");
printf("Please choose from the following.\n\n");
printf("1. Check Balance\n");
printf("2. Withdraw Cash\n");
printf("3. Deposit Cash\n");
printf("4. Transfer\n");
printf("\nEnter your choice:");
scanf_s("%d",option);
}
void Keepgoing(char *goagain)
{
printf("\nWould you like to do another transcation?\n");
printf("\nChoose y/n:");
scanf_s(" %c",goagain);
}
void AccountMenu(char *acctType)
{
printf("\nWhich account would like to access?\n");
printf("\nC for Checking\n");
printf("\nS for Savings\n");
printf("\nE for Credit\n");
printf("\nChoose an account:");
scanf_s(" %c", acctType);
}
void MakeDeposit( double *balance);
void MakeWithdrawal( double *balance, char acctType);
void GetBalance( double balance);