Quote:reruns itself when 'y' is entered and when 'n' is entered,
Sure, for this you make it run again, and again, and again, until the condition (inputing 'n') is met.
How do we make a program a group of statements again and again? Use the guide that you are reading to learn about these structures in C++. There are good practices and bad practices, try them out and if you don't understand, come back to us and we will help you. :-)
You are looking for a
statement here to perform a set of actions until the condition is true. The condition, in this case, is that the user inputs 'y
do-while loop - cppreference.com
Oh, and there is a missing closing brace (unless you missed copying the last line of your program