Finished question 7.

Added code to compare string to terminate as required.