title: Trying to make a loop which counts letters but not spaces
body: <p>I am trying to construct a simple programme which counts the number of letters in a user's input. My idea was to use a <code>for</code> loop which would loop for each letter in a string, increment a counter, and return the final counter total at the end. However, I do not want the programme to count spaces- I attempted to use the <code>isalpha</code> function to do this- but I seem to be formatting it incorrectly. Also, the way I tried to make the counter NOT increment for a space was with <code>c = c</code>, however, this also seems to be incorrect. Here is the code I have written so far:</p>
  <pre><code>int c = 0;
  
  int main(void)
  {
      string s = get_string(&quot;Input:  &quot;);
      printf(&quot;Output: &quot;);
      for (int i = 0; i &lt; strlen(s); i++)
      {
      if( s[i] (isalpha))
          {
          c++;
          }
      else
          {
          c = c;
          }
      }
      printf(&quot;%i\n&quot;, c);
  }
  </code></pre>