Loop question C++ ask for a number then ask to type a number as many times as the number entered.?

hi everyone, how can i create a program that would ask me for a number: then will ask me to "enter a number" depending on the quantity i say i was going to enter. computer - How many numbers will be entered? user - ( hum mm let's enter) 3 computer - enter number : user ... show more hi everyone,

how can i create a program that would ask me for a number: then will ask me to "enter a number" depending on the quantity i say i was going to enter.

computer - How many numbers will be entered?

user - ( hum mm let's enter) 3

computer - enter number :
user - 4

computer - enter number :
user - 2

computer - enter number :
user - 20




This is what i have so far....but I got stuck the questions go on and on and I don't know how to adjust my loop to stop if I say i was going to enter 3 numbers.




cout << "How many numbers will be entered ? : ";
cin >> number-entered;
while (number-entered >0){
cout << "Enter number:"
cin >> number-entered;
}

output:

How many numbers will be entered: ? 3

Enter number:12
Enter number:13
Enter number:20
Enter number:15
Enter number:45

Thanks !!!
2 answers 2