title: C joining two functions
body: <p>This is a standard bank account program. Allowing for deposit,withdrawal,and viewing funds. I am having trouble getting the program to enter the functions inside my switch statement which is based on their choice. Here is the output of this code.
  <a href="https://i.stack.imgur.com/vphvZ.jpg" rel="nofollow noreferrer">CodeOutput</a>. I am not asking anyone to code for me, if you could maybe just point to where I went wrong.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  float getDeposit(float currentBalance);
  float getWithdrawal(float currentBalance);
  float displayBalance(float currentBalance);
  char displayMenu();
  
  int main()
  {
  
  
      float currentBalance=200,newBalanceDep,newBalanceWith;
      char choice;
      choice = displayMenu();
  
  
          switch (choice)
      {
  
          case 'D': case 'd':
              newBalanceDep=getDeposit(currentBalance);
              break;
          case 'W': case 'w':
              newBalanceWith=getWithdrawal(currentBalance);
              break;
          case 'B': case 'b':
              displayBalance(currentBalance);
              break;
          case 'Q': case 'q':
  
              printf("Thank you!");
              break;
          default:
              printf("Invalid choice.");
              break;
  
      }
  
      return 0;
  }
  
  char displayMenu()
  
  {
      char choice;
  
      printf("Welcome to HFC Credit Union! \n"); 
      printf("Please select from the following menu: \n");
      printf("D: Make a deposit \n");
      printf("W: Make a withdrawal \n");
      printf("B: Check your account balance \n");
      printf("Q: To quit \n");
  
      scanf("\n%c",choice);
  
      return choice;
  
  }
  
  float getDeposit(float currentBalance)
  {
      float depositAmount;
      float newBalanceDep;
  
  
  
      printf("Enter amount you would like to deposit: /n");
      scanf("%f",&amp;depositAmount);
  
      if(depositAmount&gt;0)
      {
          newBalanceDep=depositAmount+currentBalance;
      }
  
      return newBalanceDep;   
  }
  
  float getWithdrawal(float currentBalance)
  {
      float withdrawalAmount;
      float newBalanceWith;
  
      printf("Enter amount you would like to withdrawal: /n");
      scanf("%f",&amp;withdrawalAmount);
  
      if(withdrawalAmount&gt;currentBalance)
      {
          printf("Insufficient Funds. Try again.");
          printf("Enter amount you would like to withdrawal: /n");
          scanf("%f",&amp;withdrawalAmount);
  
      }
      else if(withdrawalAmount&lt;=currentBalance)
      {
          newBalanceWith=withdrawalAmount+currentBalance;
      }
  
      return newBalanceWith;  
  }
  
  float displayBalance(float currentBalance)
  
  {
      printf("Your current balance is %.2f",currentBalance);
  
  }
  </code></pre>