Having some serious trouble

okay, so maybe set a boolean and in the while() loop, see if it true or false?

And do you have any suggestions on ways to read characters?