title: DD/MM/YYYY input validation
body: <p>I am working on a <code>date validation</code> (MM/DD/YYYY) and getting this error:</p>
  
  <blockquote>
    <p><em>error: lvalue required as left operand of assignment</em></p>
  </blockquote>
  
  <p>at line:9 (<code>if ( Y%4=0 ) { return true; }</code>) running this piece of code?</p>
  
  <pre><code>bool valDate( int M, int D, int Y ) 
  {
      if (! (1&lt;=M and M&lt;=12) ) return false;    
      if (! (1&lt;=D and D&lt;=31) ) return false;
      if ( (D==31) and (M==2 or M==4 or M==6 or M==9 or M==11) )        
          return false;
      if ( (D==30) and (M==2) ) return false;
      if ( (M==2) and (D==29) ) { 
          if ( Y%4=0 ) { return true; }        
          else { return false; }        
          if ( (Y%100==0) and (Y%400==0) ) { return true; }
          else { return false; }
      }   
  }
  </code></pre>
  
  <p>Can anyone explain the error (and what's I'm doing wrong) please? Cheers!!</p>