Your statement
"while((response!='y')||(response!='n'))"
says while response is not equal to 'y' OR response is not equal to 'n' - this will cause an infinite loop since the condition will always be true!
Change the OR (||) tp AND (&&)
After the second "cin >> response;" put "response = tolower(response); then the second while statement becomes "while (response == 'y');"
Alan
|