I have to use do-loop to prompt the user either to repeat or to quit the program. I started the program with declaring the variable as character and i don't know if it's right or not.
char quit = q
do {
// prompt the user if he/she wants to play again
cout << "Enter q to quit the program" ;
cin >> quit;
Yes, it will keep asking you to enter q, then when you do it will quit. You can also just enter random crap and press enter and it will still keep running until q is entered.