Enter space and save it in an integer array until you get a line character in C language I want to print them out in order. The maximum number of integers to be entered is not more than 100.)
5 6 10 1 2
Output
5 6 10 1 2
I want to receive it like this, what should I do?
int t;
while(~scanf("%d",&t)){
...
}
I think there was a way to do this. Is there any other way?
c file-io algorithm
// Enter code here
// Performing an iterative operation
while(1) {
// Receive integer input
// Verify that the entered value is an open character
if (?) {
// Escape the Roof Door
break;
}
// If not, add a value to the array
}
// Array Output
for (inti=0; i<Total length of array; i++) {
printf("%d", array[i]);
}
// Enter code here
// Is the opening character output?
char a;
scanf_s("%c", &a);
printf("%c", a);
© 2024 OneMinuteCode. All rights reserved.