I am doing a project for school and we have to create a loop quote system. I am trying to get the code to prompt the user to ask if they want to do another quote.
If the user inputs 'N' the code does the end program statement as well as the incorrect response statement. Any help would be appreciated, the code is below and the output is below the code.
if (runQuote = 'N' || 'n') {
cout <<"Thank you for using this program. Goodbye. \n";
} else {
" ";
}
if (runQuote != 'Y' || 'y' || 'N' || 'n') {
cout << "Sorry but the response you answered is not valid,
Would you like to process another quote (Y/N)?\n";
cin >> runQuote;
}
The output if I input 'N' after the prompt is:
Thank you for using this program. Goodbye.
Sorry but the response you answered is not valid,
Would you like to process another quote (Y/N)?