I would like to input 5 words one word at a time and then with that word print out each letter of the word. However, I enter a while loop and it looks like the while loop never terminates after I enter the first word.
const int amountOfInputs = 5;
for (int i = 1; i <= amountOfInputs; ++i)
{
printf("Word Number # %d :\n", i );
char reader;
while(reader = getchar(), reader >= 0 )
{
printf("letters of word %d are: %c \n", i, reader);
}
}
Output:
