Adrian Meneses wrote:Does not print even though it compiles and runs just fine. I can enter lines of text but it will not print how many lines have been entered. What is wrong?
The code is going to stay ion the
while loop until there is no more input - how are you terminating your input? From the Linux command line, you would normally use
Control-D:
You could also
test by redirecting standard input from a file: