title: CS50's Readability/ How can i use my functions?
body: <pre><code>#include &lt;cs50.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;ctype.h&gt;
  #include &lt;string.h&gt;
  #include &lt;math.h&gt;
  
  int count_letters(string);
  int count_words(string);
  int count_sentences(string);
  
  float l, w, s;
  
  int main(void)
  {
      //Get text
      string text = get_string(&quot;Text:&quot;);
  
      //Get the length of text
      int i = strlen(text);
  
      //Coleman-Liau index
      float L = 100.0f * (l / (float)w);
      float S = 100.0f * (s / (float)w);
      int index = round(0.0588 * L - 0.296 * S - 15.8);
  
      if (index &lt; 1)
      {
          printf(&quot;Before Grade 1\n&quot;);
      }
      else if (index &gt; 16)
      {
          printf(&quot;Grade 16+\n&quot;);
      }
      else
      {
          printf(&quot;Grade %i\n&quot;, index);
      }
  
  }
  
  int count_letters(string text)
  {
      //Letters start from 0
      l = 0;
  
      for (int i = 0, n = strlen(text); i &lt; n; i++)
      {
          if (isalpha(text[i]))
          {
              l++;
          }
      }
      return l;
  }
  
  int count_words(string text)
  {
      //Spaces + 1 equals to count of words
      w = 1;
  
      for (int i = 0, n = strlen(text); i &lt; n; i++)
      {
          //Space equals to number 32 in ASCII Chart
          if(text[i] == ' ')
          {
              w++;
          }
      }
      return w;
  }
  
  int count_sentences(string text)
  {
      s = 0;
      for (int i = 0, n = strlen(text); i &lt; n; i++)
      {
          if(text[i] == '!' || text[i] == '.' || text[i] == '?')
          {
              s++;
          }
      }
      return s;
  }
  </code></pre>
  <p>The index is always the same negative number so I can only get &quot;Before Grade 1&quot; output because i don't use any of my created functions.</p>
  <p>I have created 3 functions below my code but I don't know how to use them in main.I want my functions to be able to calculate the count of letters(l), words(w) and sentences(s) in a text in order to find the index.Can you help me?</p>