Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define x 4
- void func(int tab[x][x], int w,int k) {
- for (int i = 0; i < w; i++) {
- for (int j = 0; j < k; j++) {
- if (tab[i][j] % 2 == 0 && (i+1 == w || j+1 == k))
- cout << tab[i][j] << endl;
- }
- }
- }
- int main()
- {
- int A[x][x] = { 2,2,2,2,5,6,7,8,9,10,11,12,13,14,15,16 };
- func(A, x, x);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement