< Previous | Contents | Next >

Saying Goodbye

When the loop ends, the player has either won or quit, so its time to say goodbye.

if (guess == theWord)

{

cout << "\nThat’s it! You guessed it!\n";

}


cout << "\nThanks for playing.\n";


return 0;

}

If the player has guessed the word, I congratulate him or her. Finally, I thank the player for playing.