I have tried various break statements and I cannot get my program to break correctly.
Original program is a nested loop asking user for input for either an ascending or descending triangle. That works. But when I try to add a break, it either runs after entering how I want my traingle displayed or asks the wrong cout statement. Program is to run either of the triangles and then ask me if I would like to run again by enter (A)scending or (D)escending. I also am giving the user 'Q' to quit.
I have written this much, but when I incorporate it into my program it does not work.
while((answer != 'Q') && (answer != 'q'))
cout << "Do you want to quit displaying triangle?" << endl;
cin >> answer;
Then I go into my if and else statement for each triangle. Can someone help me understand what I am doing wrong. THANKS.