Me not understanding do while loops : <p>So i tried to make my first console aplication but it came to a bit of a bummer since i dont understand how a do while loop works</p>

<pre><code>#include &lt;iostream&gt;

int balance = 100;
int pay = 30;
int awnser;

// Variables for the awnsers
int withdrawal;
int a = 1;


int main() {
    do {
        std::cout &lt;&lt; "\n Whats the action you wanna do? \n 1 = Check balance \n 2 = Withdraw money \n 3 = Deposit money \n 4 = Check transaction history \n 5 = Exit \n";
        std::cout &lt;&lt; " ";
        std::cin &gt;&gt; awnser;

        if (awnser == 1) {
            std::cout &lt;&lt; balance &lt;&lt; " Euros\n \n";
        }

        if (awnser == 2) {
            std::cout &lt;&lt; "How much do you wanna with draw?\n";
            std::cin &gt;&gt; withdrawal;
            if (withdrawal &gt; balance)
                std::cout &lt;&lt; "You dont have that much money.\n \n";
            else {

                std::cout &lt;&lt; "Your current balance is: " &lt;&lt; balance - withdrawal;

            }

        }

        if (awnser == 3) {
            std::cout &lt;&lt; "We know you dont have enymore daam money you beggar so dont even try that\n \n";
        }

        if (awnser == 4) {


        }

        if (awnser == 5) {
            std::cout &lt;&lt; "Enter 0 to exit or 1 to go back\n";
            std::cin &gt;&gt; a;
        }
        else if (a == 1) {
            std::cout &lt;&lt; "\n";
            return 1;

        }


    } while (a == 1);

}
</code></pre>

<p>I thought it would get back to the top since no other "if" requierements were met and just give me the "Whats the action you wanna take again" but it just exits out so what am i doing wrong?</p>
