write in the cin as much numbers as i want

i know it might be a silly question but i totally forgot the code
so im doing a program that calculates the class average, i remember a code that keeps the user from writing number and when he's dont he writes a number that i say, can anyone help ?
Topic archived. No new replies allowed.