thankyou so much for your replies, and thankyou SlyMaelstrom for re-writing the program, it now works just the way i wanted it to
Please could you explain a bit more about why cin.ignore() was required and cin.get() didn't work because i dont understand where i had the newline character in the input stream or what it causes
I would also like to know about how program code is read by the computer (program\source code flow) so that i can understand how to write code in the correct order because you were right about me not putting the "\n" character in the right place.