#include<stdio.h>
int fun(int a[],int b[],int x,int* y);
int main()
{int m;
int n,i,a[1000],b[1000];
scanf("%d",&n);
for(i=0;i<n;i++)
{scanf("%d",&a[i]);
}
fun(a,b,n,&m);
for(i=0;i<m;i++)
{printf("%d ",b[i]);
}
return 0;
}
int fun(int a[],int b[],int x,int* y)
{
int i,j=0;
for(i=0;i<x;i++)
{if(a[i]%2==0)
{b[j]=a[i];j++;
}
}
*y=j;
printf("%d\n",j);
return 0;
}
标签:return,int,scanf,11.24,printf,fun,1000 From: https://blog.51cto.com/u_15758636/5884453