title: C addition using modulus
body: <p>I came across an intriguing C code that prints <code>A + B</code>, but I have trouble understanding it.</p>
  <h2>Input Format:</h2>
  <pre><code>A B
  </code></pre>
  <p>where <code>A</code>, <code>B</code> are integers between <code>0</code> and <code>10</code> separated by a single space.</p>
  <h2>Code:</h2>
  <pre><code>main( n )
  {
      gets( &amp;n );
      printf(&quot;%d&quot;, n % 85 - 43);
  }
  </code></pre>
  <p>This was intended for short coding, please don't mind the warnings.</p>
  <h2>What I understand so far:</h2>
  <p><code>gets( &amp;n )</code> stores the ASCII values of A, space, and B in the lower three bytes of <code>n</code>. For example, <code>A = 3</code> and <code>B = 8</code> would yield <code>n = 0x00382033</code>. Given conditions prevent <code>n</code> from overflowing. But I do not understand how <code>n % 85 - 43</code> yields <code>A + B</code>.</p>
  <p>How do you come up with these numbers?</p>