title: C program that reads a string
body: <p>I'm trying to write a program that reads (accepts) a sentence with spaces until the user ends it with a point.
  for some reason, my code stops when the user types two points instead of only one, I'll leave my code below:</p>
  <pre><code>char sent[100];
  int i;    
  
  printf(&quot;Write a sentence and end it with a point :\n&quot;);
  
  for (i=0; sent[i]!='.'; i++)
  {
      scanf(&quot;%s&quot;,&amp;sent[i]);
  }
  </code></pre>