Previous post deleted.
Having re-read the question, I have a different take on what it means.
It appears that what is being asked is, from the input of: 1, 2, 88, 42, 99 - output must be each digit up until when 42 is typed, then no output from anything entered.
I now have a program that does that:
for (int i = 0; i <= 10; i++)
cin >> inputDigit;
if (inputDigit != 42)
cout << endl << inputDigit;
It's messy, but it works. However, on submission I got "wrong answer". Blah!
 edited to save multiple posts.