Help with Reverse Guessing Game Code
I'm new to java, and need to write a program where the program asks the user to think of a number between 1 and 10, and then the programs generates random guesses until the user confirms with y that the number is correct, and then displays the results, including number of attempts.
I'm using a counter, I know how to print introduction and results. I'm having a problem though. I need to create a method that takes a prompt String and a Scanner as input and returns a char. If kb was the scanner object, the call would be:
char ans = promptYN("Do you want to play against", kb)