hi for a school c++ project i have to make a program that's a while loop that asks for an integer repeatedly until until 0 is entered. It then has to display all of the integers
Two things stand out with this problem.
1. Obviously, a while loop is needed
2. You want a 'place' to store the integers
To give you a start, check out this pseudocode
input number //get the first number
while number does not equal 0 //loop terminated when number equals 0
{
store the number //store the number into a vector
input number //get another number
}
output the numbers
Hint: You can store the numbers into a vector<int> object