How to validate user input a number and the number greater than 0
<p>I'm trying to validate user input that user must enter number and it must be greater than 0, the validation of only numbers I got it working; however, I can't seem to incorporate the validation of greater than 0</p>

<pre><code>float income;
cout &lt;&lt; "How much did you earn last year: ";

    //validating imput for income
    while(!(cin &gt;&gt; income))
    {
         char ch;
         cin.clear();
         cout &lt;&lt; "Sorry, number must be biger than \"0\" \n"
              &lt;&lt; "How much did you make last year: ";
         while(cin.get(ch) &amp;&amp; ch != '\n');
    }
</code></pre>
