While-loops are used when something needs to be repeated until a certain condition is true, for example in games until the player ends the game.
Do-loops are used when something need to be done at least once and then is repeated until it's 'right', for example when the user needs to input a year, the program should repeat the question while the user inputs things as "I'm not gonna tell you when I was born!" in steat of "1840".
For-loops are used when something needs to be repeat a number of times, and that number is known at the moment the loop starts. For example, when you want you printer to print a certain document 200 times.
Place the whole program in a while-loop or do-while loop, use a bool declared outside this loop as condition and give the user the option to set this bool to true or false inside the loop.
My code was only ment to show the construction: it wasn't correct code. You made answer of type char (contains only one character), while "no" is op type string. Making answer of type string would solve the problem, or chancing the condition to answer == 'n'. Make sure the user knows what sort of answer are expected from him, by using something as cout<<"Do you want to go on? <j/n>";