Answers for "stop entering when enter key is pressed"

0

stop entering when enter key is pressed

int list[50];
int i = 0;
int input;
while (i < 50){
  cin >> input;
  if(input == '\n') break;
  list[i] = input;
  i++;
}
Posted by: Guest on June-14-2021

Code answers related to "stop entering when enter key is pressed"

Browse Popular Code Answers by Language