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
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 ?
#include <iostream>
usingnamespace 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; }