1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| #include<stdio.h>
#include <stdlib.h>
#include <string.h>
typedef int tableau [9][9];
void lire_fichier( char *nf, tableau t1)
{ int i,j;
FILE*f; f = fopen(nf,"r");
for (i=0; i=8; i++)
for (j=0; j=8; j++)
fscanf( f, "%d",&t1[i][j]);
fclose(f);
}
void afficher(tableau t1)
{ int i,j;
for (i=0; i=8; i++)
for (j=0; j=8; j++)
{ scanf("%d",&t1[i][j]);
printf("%d",t1[i][j]);
}
printf("\n");
}
main()
{tableau t1;
lire_fichier("vide1.dat",t1);
afficher(t1);
} |