I need at least one loop in my project. My knowledge of loops seems to not all be there yet. When I run my code right now the loop runs on and on. Both do not work right now in my code. Any advice or help will be much thanked!
I am stuck in an infinite loop. I would like the program to loop back to the question if the input was not one given. Like if you put in F instead of a letter through A-D, or for the gender one too.
put another cin >>answer inside your 1st do - while loop, below cout << "Error"; so that you can repeat the input if the answer doesn't meet the condition in while ()
You made d your third choice. You're going to confuse the user. To make your code a little bit easier for you, you could also use answer = tolower(answer);. This will put answer in lower case, so you only have to compare against lower case letters.