title: repeat do while loop if switch statement reaches default
body: <p>I have a do while loop asking for user input. Inside this do while loop I have a switch statement. How can I make it so that if the default value is met repeat the loop asking for the users gender again?</p>
  
  <pre><code>do
      {
          cout &lt;&lt; "What is your weight?" &lt;&lt; endl;
          cin &gt;&gt; weight;
          cout &lt;&lt; "What is your height?" &lt;&lt; endl;
          cin &gt;&gt; height;
          cout &lt;&lt; "What is your age?" &lt;&lt; endl;
          cin &gt;&gt; age;
          cout &lt;&lt; "What is your gender?" &lt;&lt; endl;
          cin &gt;&gt; gender;
  
          switch (gender)
          {
              case 'M':
              case 'm':
                  cout &lt;&lt; endl &lt;&lt; Male(weight, height, age);
                  break;
              case 'F':
              case 'f':
                  cout &lt;&lt; endl &lt;&lt; Female(weight, height, age);
                  break;
              default:
                  cout &lt;&lt; "What is your gender?";
          }
  
          cout &lt;&lt; "Do you want to continue? (Y/N)" &lt;&lt; endl;
          cin &gt;&gt; stopApp;
  
      } while(toupper(stopApp) == 'Y');
  </code></pre>