I'm going to write a program that takes string until end of file(eof). An condition must be considered and that is it must also terminate by a new line. For example when it's prompting me to enter a string if I press enter it must terminate and exit the program. How is it possible?
I tried saving carriage return("\t\n") as a string then I compared it with the entered string but it didn't work.
Any idea will be appreciated!