I dont understand

Hello ,
First of all i am very new to C++ and kinnda dont know what im doing and i have a project that contains 16Q for writing programs , i was only able to write some of them . but there is a Q where i cant even understand what am i supposed to do
it is :
write a program to enter a set of numbers and print condition stop when you enter the number 5

is supposed to print "conditional stop" or just crash the program
As I read it the first time :

write a program to enter a set of numbers and print ( print those numbers )
halt the program when the number 5 is entered.

It is a poorly written instruction because it can be interpreted several ways.

Re-reading it the author could mean :

write a program which prompts you to enter numbers
once the number 5 is entered, print the previously entered numbers.
I know what you mean , and i am soo confused
and the problem is that MOST of the Q's are written poorly
its because our first language isn't english
so how do you suggest i answer it ?
and how can i enter a number in a different line "PRESS ENTER" without the program closing ?
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <iostream>
using namespace std;

int main() {
int a;
cout << "enter a number: " ;
cin >> a;
while ( a!=5) // while a is different from 5
{
	cout << "enter a number: ";
	cin >> a ;
}
return 0; }
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <iostream>
using namespace std;

int main() {
int a;
cout << "enter a number: " ;
cin >> a;
do
{
	cout << "enter a number: ";
	cin >> a ;
}while (a!=5);
return 0; }


Thats for do-while loop.
Topic archived. No new replies allowed.