/* Matrice unitaire */ #include #include #define DIMENSION 4 int main() { int matrice[DIMENSION][DIMENSION]; for (int i = 0; i < DIMENSION; i++) { for (int j = 0; j < DIMENSION; j++) { if (i == j) matrice[i][j] = 1; else matrice[i][j] = 0; printf("%d ", matrice[i][j]); } printf("\n"); } return 0; }