title: My cipher() function does not seem to support uppercase letters
body: <p>Here is my function:</p>
  
  <pre><code>// Helper function for cipher()
  void cipherc(char&amp; c, int key)
  {
      if (isupper(c)) {
          c -= 'A';
      } else {
          c -= 'a';
      }
  
      c += key;
      c %= MAX_KEY;
  
      if (isupper(c)) {
         c += 'A';
      } else {
          c += 'a';
      }
  }
  </code></pre>
  
  <p>I designed it to support uppercase letters, and I though this would work. Apparantly I have no idea what i'm doing. If someone could show me a better way to do this or fix this that would be great. I would like to (hopefully) keep the function the same, taking <code>char&amp;</code> and <code>int</code> and returning <code>void</code>.</p>