Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef struct
- {
- int t[5][5];
- } Tableau
- void remplir_matrice(Tableau *matrice)
- {
- int x, y;
- for(y = 0; y < dim_y; y++)
- {
- for(x = 0; x < dim_x; x++)
- {
- if(x == y)
- matrice->t[y][x] = 1;
- else
- matrice->t[y][x] = 0;
- }
- }
- }
- int main()
- {
- Tableau ma_matrice;
- remplir_matrice(&ma_matrice);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement