title: How to keep a do...while loop from looping more than once while the condition is set to true
body: <p>Every other option works except for option 1. After a user has input name and account type. It enters into an infinite loop. How do I set my do-while loop to fix this behavior? Please can someone help me fix this problem? </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;queue&gt;
  #include &lt;stack&gt;
  #include &lt;vector&gt;
  #include &lt;unordered_map&gt;
  #include &lt;algorithm&gt;
  using namespace std;
  
  #include&lt;iostream&gt;
  #include&lt;string&gt;
  #include&lt;iomanip&gt;
  #include&lt;cstdlib&gt;
  using namespace std;
  
  class Bank{
  
      //data members
  private:
      string customer_name;
      double account_number;
      string type_of_account;
      double account_balance;
      double balance;
  
  
      //function declaration
  public:
      void assignInitialValue(void);
      void deposit();
      void makeWithdrawal();
      void displayNameAndBalance();
      void displayDetails();
  };
  
  //function definitions
  void Bank::assignInitialValue(void){
      cout&lt;&lt;"Welcome to Our Bank."&lt;&lt;endl;
      cout&lt;&lt;"To open an Account with us,please supply the following details"&lt;&lt;endl;
      cout&lt;&lt;"Enter your name in full"&lt;&lt;endl;
      cin&gt;&gt;customer_name;
      cout&lt;&lt;"Choose an Account type"&lt;&lt;endl;
      cin&gt;&gt;type_of_account;
      cout&lt;&lt;"Enter your Account Number"&lt;&lt;endl;
      cin&gt;&gt;account_number;
      cout&lt;&lt;"Enter an Amount you will like to open this account with"&lt;&lt;endl;
      cin&gt;&gt;account_balance;
      cout&lt;&lt;"Thank you for banking with us";
  }
  
  void Bank::deposit(void){
      scout&lt;&lt;"Enter the amount you want to deposit"&lt;&lt;endl;
      double deposit_amount = 0.0;
      cin&gt;&gt;deposit_amount;
      account_balance = account_balance + deposit_amount;
      cout&lt;&lt;"Your new balance is now:"&lt;&lt;account_balance;
      balance = account_balance;
  }
  
  void Bank::makeWithdrawal(void){
      int withdrawal_amount;
      cout&lt;&lt;"\nBalance Amount = "&lt;&lt;balance;
      cout&lt;&lt;"\nPlease Enter the Amount you want to withdraw:-";
      cin&gt;&gt;withdrawal_amount;
      if(!(withdrawal_amount &gt; balance))
          balance=balance-withdrawal_amount;
      else
      {
          cout&lt;&lt;"Insufficient Balance";
      }
      cout&lt;&lt;"Your Available Balance is:"&lt;&lt;balance;
  }
  void Bank::displayDetails(void)
  {
      cout&lt;&lt;endl&lt;&lt;endl&lt;&lt;endl;
      cout&lt;&lt;setw(50)&lt;&lt;"CUSTOMER DETAILS"&lt;&lt;endl;
      cout&lt;&lt;setw(50)&lt;&lt;"Customer Name "&lt;&lt;customer_name&lt;&lt;endl;
      cout&lt;&lt;setw(50)&lt;&lt;"Account Number."&lt;&lt;account_number&lt;&lt;endl;
      cout&lt;&lt;setw(50)&lt;&lt;"Account Type"&lt;&lt;type_of_account&lt;&lt;endl;
      cout&lt;&lt;setw(50)&lt;&lt;"Balance"&lt;&lt;balance&lt;&lt;endl;
  }
  
  int main()
  {
      Bank app;
      int Activity_code;
  
      do
      {
          cout&lt;&lt;"\n\nAvailable Transactions\n\n";
          cout&lt;&lt;"1)  To create Account with us press 1\n";
          cout&lt;&lt;"2)  To make deposit press 2\n";
          cout&lt;&lt;"3)  To make Withdrawal press 3\n";
          cout&lt;&lt;"4)  To Display All Details press 4\n";
          cout&lt;&lt;"5)  EXIT\n";
          cout&lt;&lt;"Please enter an Activity choice :-";
  
          cin&gt;&gt;Activity_code;
  
  
          switch(Activity_code)
          {
              case 1: app.assignInitialValue();
                  break;
              case 2: app.deposit();
                  break;
              case 3: app.makeWithdrawal();
                  break;
              case 4: app.displayDetails();
                  break;
              case 5: goto terminate;
          }
      }while(true);
  terminate:
      return 0;
  }
  </code></pre>