Depending on exactly what you want it to do, you may just need to move the first cout and cin into the loop (at the top).