title: How to ask for Age and set everything else as invalid?
body: <p>I'm trying to set a basic program that asks for Age, And if the Number entered by the user is less than 99, It will say "Perfect". If the number is MORE than 99, it will say "You Can't be that old, Try again". Additionally, if the user enters something that is not a number (like a letter "m, r" or anything else like "icehfjc") then it will say "That is not a number."</p>
  
  <p>This is my code so far: </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  using namespace std;
  
  int main()
  {
  int age;
  
  backtoage:
  cout &lt;&lt; "How old are you?\n";
  cin &gt;&gt; age;
  
  if (age &lt; 99)
  {
          cout &lt;&lt; "Perfect!\n";
          system("pause");
          }
  
      if (age &gt; 99)
      {
          cout &lt;&lt; "You can't be that old, Try again.\n";
          system("pause");
          system("cls");
          goto backtoage;
      }
  
      Else
      {
         cout &lt;&lt; "That is not a number, Please Enter a Valid Number\n";
         system("pause");
         system("cls");
         goto backtoage;
      }
  
  }
  </code></pre>
  
  <p>I know "Else" doesn't work because C++ treats letters as integers as well, so
  if I write "m" it will take it as a >99 number (because of the integer value of "m") therefore displaying the "you can't be that old" message. but how can I fix this so the program displays "Please enter a number" when a letter is entered? (If anyone could fix the code and write it in a way that works, I'd 
  be forever grateful).</p>
  
  <p>Any suggestions, tips or hints are very welcome.</p>