Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int matrix[3][3] = {{1, 2, 3},
- {4, 5, 6},
- {7, 8, 9}};
- for (int i = 0; i < 3; i++)
- for (int j = 0; j < 3; j++)
- for (int l = 0; l < 3; l++)
- for (int c = 0; c < 3; c++)
- if (i != l && j != c)
- if (matrix[i][j] == matrix[l][c])
- printf("Tem numero repetido na linha %d e coluna %d com o valor %d\n", i, j, matrix[i][j]);
- getchar();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement