1 2 3 4 5 6 7
int A[N], B[N+N]; // Заполняешь массив A for(i=j=0; i<N; i++) { if (A[i]%7) B[j++] = A[i]; else continue; if (A[i]%2) B[j++] = 4; }