title: caesar: lowercase letters that loop from z are not printing
body: <p>I'm kinda stuck on this one. When I run my program all of the letters that loop past z do not print for some reason. The problem comes from this link: <a href="http://docs.cs50.net/2016/x/ap/problems/caesar/caesar.html" rel="nofollow noreferrer">http://docs.cs50.net/2016/x/ap/problems/caesar/caesar.html</a>  Here is my code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;cs50.h&gt;
  #include &lt;ctype.h&gt;
  #include &lt;string.h&gt;
  
  int main(int argc, string argv[])
  {
      if (argv[1] != NULL)
      {
          int k = atoi(argv[1]);
          if ((argc == 2) &amp;&amp; (k &gt;= 0))
          {
              printf("Type what you would like to encrypt!\n");  
              string text = GetString();
              for (int i = 0, n = strlen(text); i &lt; n; i++)
              {
                  if (isalpha(text[i]) || isspace(text[i]))
                  {
                      if (isupper(text[i]))
                      {
                          text[i] = text[i] + k;
                          if (text[i] &gt; 'Z')
                          {
                              text[i] = text[i] - 26;
                              printf("%c", text[i]);
                          }
                          else
                          printf("%c", text[i]);
                      }
                      else if (islower(text[i]))
                      {
                          text[i] = text[i] + k;
                          if (text[i] &gt; 'z')
                          {
                              text[i] = text[i] - 26;
                              printf("%c", text[i]);
                          }
                          else                        
                          printf("%c", text[i]);
                      }
                      else if (isspace(text[i]))
                      {
                          printf(" ");
                          if (isupper(text[i + 1]))
                          {
                              text[i + 1] = text[i + 1] + k;
                              if (text[i + 1] &gt; 'Z')
                              {
                                  text[i + 1] = text[i + 1] - 26;
                                  printf("%c", text[i + 1]);
                              }
                              else
                              printf("%c", text[i + 1]);
                          }
                          else if (islower(text[i + 1]))
                          {
                              text[i + 1] = text[i + 1] + k;
                              if (text[i + 1] &gt; 'z')
                              {
                                  text[i + 1] = text[i + 1] - 26;
                                  printf("%c", text[i + 1]);
                              }
                              else
                              printf("%c", text[i + 1]);
                          }
                          i++;
                      } 
                  }
                  else
                  printf("%c", text[i]);
              }
              printf("\n");
              return 0;
          }
          else
          printf("Usage: ./caesar &lt;non-negative integer&gt;\n");
          return 1;        
      }
      else 
      printf("Usage: ./caesar &lt;non-negative integer&gt;\n");
      return 1;    
  }
  </code></pre>
  
  <p>When I input "./caesar 13" (13 being the encryption key) into my terminal, I get prompted to input my desired text. However, when I input "matteo maTTeo", I get the output of: "znrb znGGrb". Why is this the case? I am pretty new to coding, so if the answer is obvious, go easy on me please! Thanks!</p>