my loop is not repeating correctly.

for loop
Last edited on
Looks like there's a newline character left in the input stream after the user types 'c' and hits the enter key. That newline gets read in as the next input.

Try putting cin.ignore(); after line 69 to deal with that newline.

1
2
3
cin >> answer;
cin.ignore();
} while (answer == 'c' );
Last edited on
Whats the question? All you said was for loop.
No, (s)he asked a question, got an answer and then (s)he edited the post so his/her professor wouldn't see it. It is actually pretty common on this website and frowned upon.
Topic archived. No new replies allowed.