mirror of
https://github.com/renbaoshuo/202401-programming-assignments.git
synced 2024-12-16 15:44:39 +00:00
22 lines
330 B
C
22 lines
330 B
C
#include <stdio.h>
|
|
|
|
int main() {
|
|
int x, flag = 0;
|
|
|
|
while (scanf("%d", &x) != EOF && x != -1) {
|
|
if (x % 2 == 1) {
|
|
if (flag == 1) {
|
|
printf(" ");
|
|
} else {
|
|
flag = 1;
|
|
}
|
|
|
|
printf("%d", x);
|
|
}
|
|
}
|
|
|
|
printf("\n");
|
|
|
|
return 0;
|
|
}
|