Ireland1978
Programmer
Hi all,
How would I go about writing code which would count the amount of alphabetic characters entered, and also the amount of words?
I know it would involve some sort of loop.
eg. Input: How now brown cow
Output:
Words = 4
Letters = 14
I would ideally like to be just pointed in the right direction, as I like working these out for myself, but don't know where to start!!
I presume I'd use the spaces to determine the amount of words - would I use the ASCII notation for space?
Thanks
How would I go about writing code which would count the amount of alphabetic characters entered, and also the amount of words?
I know it would involve some sort of loop.
eg. Input: How now brown cow
Output:
Words = 4
Letters = 14
I would ideally like to be just pointed in the right direction, as I like working these out for myself, but don't know where to start!!
I presume I'd use the spaces to determine the amount of words - would I use the ASCII notation for space?
Thanks