title: I have problems with "removing" part of my code, not working as intended
body: <p>I have problems with &quot;removing&quot; part of my code, not working as intended(TASK: make all caps, remove all nonletter). I am going through CS50, Harvard online course, in their IDE.</p>
  <p>Ex:</p>
  <pre><code>Input:nhfdjnhjsldkfnlksdaj      JKLNKJBLKL:KJ    !@#$%^&amp;&amp;*)_()+_~
  Output: NHFDJNHJSLDKFNLKSDAJ     JJKLNKJBLKLKKJ   !@#$%^&amp;&amp;*)_()+_~
  </code></pre>
  <p>Code:</p>
  <pre><code>#include &lt;ctype.h&gt;
  #include &lt;cs50.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  
  int main(void)
  {
      string word1 = get_string(&quot;Player 1: &quot;);
      
      for(int i=0; i&lt;strlen(word1);i++)
      {
          if(word1[i]&gt;='a'&amp;&amp;word1[i]&lt;='z')
          {
           // change to uppercase
           word1[i]=toupper(word1[i]);
  
          }
          else if(word1[i]&lt;'A' || (word1[i]&gt;'Z' &amp;&amp; word1[i]&lt;'a') ||word1[i]&gt;'z')
          {
              //Remove
              word1[i]=word1[i+1];
              
          }
          else
          {
              //just add, upper alredy
              word1[i]=word1[i];
          }
      }
      printf(&quot;%s\n&quot;, word1);
  }
  </code></pre>