The cin command is problematic, because there is no
checking for variable type. If you specify an integer and
the user inputs a character, you get garbage. The
solution seems to be to use gets() and then atoi(), but
I'm not sure how to do that with two-digit numbers. Any
suggestions?

For a simple yes/no or menu input function, it seems to be
enough to define a char array of no specified length,
gets() the char array, then do something like this:

while (strlen(charArray) > 2 || charArray[0] != 'y'
&& charArray[0] != 'n')
{
cout << "Pl