title: C++ How to check if double number is not entered as an alphabet
body: <p>This is a program where a user enters 5 marks, and the program calculates the average mark and grade. 
  However, it should show an error when the user enters a string (alphabet) instead of a number. How do I do this?</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  int main()
  {
  double dblMarkOne;
  double dblMarkTwo;
  double dblMarkThree;
  double dblMarkFour;
  double dblMarkFive;
  double dblAverage;
  string strGrade;
  
  cout&lt;&lt;"Enter your first mark: ";
  cin&gt;&gt;dblMarkOne;
  
  while (dblMarkOne &lt; 0 || dblMarkOne &gt; 100)
  { 
      cout &lt;&lt; "Enter a valid test score within 1 to 100. ";
      cout &lt;&lt; "Enter your first mark: ";
      cin &gt;&gt; dblMarkOne;
  }
  </code></pre>