Rosetta Code:Village Pump/

From Rosetta Code
'
This is a particular discussion thread among many which consider Rosetta Code.

Summary

in do while loop why we assign (-1) to count in the below programming

Discussion

  1. include <stdio.h>
  2. include <ctype.h>
  3. define EOL '\n'
 main()

{

  char letter[80];
  int tag, count =-1;
  do ++count;
  while ((letter[count]=getchar()) != EOL);
  tag = count;
  count=0;
  do{
   putchar(toupper(letter[count]));
   ++count;
  }
   while(count<tag);

}


in do while loop why we assign (-1) to count in the below programming.... could you assist me to overcome this problem..