Rosetta Code:Village Pump/
'
This is a particular discussion thread among many which consider 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
- include <stdio.h>
- include <ctype.h>
- 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..