求一个数组中,偶数的个数,供参考:
int count_even_dig(int a[],int n) { int i,cut=0; for(i=0;i<n;i++) { if(a[i]%2==0)cnt++; } return cnt; }