repeating or exiting

a program is successfully built
how to add the options of
do you want to play again (y/n)
1
2
3
4
5
6
7
8
string playAgain = "y";
while (playAgain == "y")
{
   // your code here

   cout << "Play again? (y/n) ";
   cin >> playAgain;
}
Topic archived. No new replies allowed.