This is my code:
#include <stdio.h>
#include <ctype.h>
int main()
{
int ch;
int numberOfCharacters = 0;
printf("please enter a word, and ctrl + d to see the resault\n");
while ((ch = getchar()) != EOF && isprint(ch))
{
numberOfCharacters++;
}
printf("The number of characters is %d", numberOfCharacters);
return 0;
}
Is this a good code?