I chose to use 3 loops - one nested inside the other. It continues to run as long as the user wants to play again. The outermost loop is a do loop that has 3 parts to its body:
Here's the pseudocode outline for my program solution:
do
{
pick a secret number
do
{
prompt for guess
while (guess is not
valid)
{
prompt for another guess
}
determine if guess is
lower, higher, correct, or 0
} while (guess isn't correct AND guess isn't
0)
prompt user to play again
} while (user wants to play again)