26 lines
277 B
C
26 lines
277 B
C
#include <stdio.h>
|
|
|
|
int main(){
|
|
int a[10], b[10];
|
|
int i;
|
|
int *p, *q;
|
|
|
|
for(i=0, p=a;i<10;i++){
|
|
scanf("%d", p++);
|
|
}
|
|
for(i=0, p=a, q=b;i<10;i++){
|
|
if(*p%2==0){
|
|
*q++=*p;
|
|
}
|
|
p++;
|
|
}
|
|
for(i=0, p=b;i<q-b;i++){
|
|
printf("%d ", *p++);
|
|
}
|
|
printf("\n");
|
|
|
|
|
|
return 0;
|
|
}
|
|
|