1
0
mirror of https://github.com/renbaoshuo/202401-programming-assignments.git synced 2024-12-16 15:44:39 +00:00
202401-programming-assignments/【实践课外】16.结构体2/7-3 新键表输出.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;
}