title: Error Correction for wrong Output
body: <p>My Programme requests two variables: one integer and one float. Both must be greater than 0 and less than 2000. But testing an input of 45 and 0 it is accepting the value and showing the output of 0.00 although the conditions require <code>(cash &gt; 0) &amp;&amp; (balance &gt; 0)</code>.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;iomanip&gt;
  using namespace std;
  int main()
  {
      int cash;
      float balance ;
      cin &gt;&gt; cash &gt;&gt; balance;
      if((cash%5==0) &amp;&amp; (cash &lt;= balance) &amp;&amp; (cash &gt; 0) &amp;&amp; (balance &gt; 0) &amp;&amp; (cash &lt;= 2000) &amp;&amp; (balance &lt;= 2000))
      {
          balance = (balance - cash) - 0.50;
          cout &lt;&lt; fixed;
          cout.precision(2);
          cout &lt;&lt; balance;
      }
      else if (cash%5 != 0)
      {
          cout &lt;&lt; fixed;
          cout.precision(2);
          cout &lt;&lt; balance;
      }
      else if (cash &gt; balance)
      {
          cout &lt;&lt; fixed;
          cout.precision(2);
          cout &lt;&lt; balance;
      }
      return 0;
  }
  </code></pre>