diff --git a/TP5/a.out b/TP5/a.out index 3e71355..f4c157d 100755 Binary files a/TP5/a.out and b/TP5/a.out differ diff --git a/TP5/carre.c b/TP5/carre.c new file mode 100644 index 0000000..0c3e37a --- /dev/null +++ b/TP5/carre.c @@ -0,0 +1,51 @@ +#include + +#define N 3 + +int main () { + + // int A[N][N] = {1,2,3,4,5,6,7,8,9}; // Initialisation pas magique + + int A[N][N] = {4,2,3,2,3,4,3,4,2}; // Initialisation pas magique + + int i , j; + + // diagonale + + int sommed1 = 0, sommed2 = 0; + + for(i=0;i