Quote Originally Posted by Salem View Post
> while (isspace(ch = getchar()))
> ;
> while (ch != '\n' && ch != EOF) {
The problem is that isspace('\n') is true, so you're not getting out of the first loop by typing a blank line.
isspace - C++ Reference

Thank you for the help sir! Fixed ))