title: modulo operation on negative numbers
body: <p>A modulo operation <code>a%b</code> returns the remainder for <code>a/b</code> but for negative numbers it does not do so.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main(void) {
    int n=-4;
    printf("%d\n",n%3);
    return 0;
  }
  </code></pre>
  
  <p>It should return 2  as 3*(-2)=-6 is just smaller than -4 and a multiple of 3 but the output is -1. 
  Why is it treating <code>(-a) mod b</code> same as <code>-(a mod b)</code></p>