From f479d8d2051c9917f623d86a7fd295f98dcff700 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9C=5BJMF=5D=E2=80=9D?= Date: Thu, 21 Oct 2021 12:47:20 +0200 Subject: [PATCH] New --- TP5/a.out | Bin 49560 -> 49600 bytes TP5/carre.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++++ TP5/fileread.c | 15 ++++++++++---- TP5/filewrite.c | 6 +++--- 4 files changed, 65 insertions(+), 7 deletions(-) create mode 100644 TP5/carre.c diff --git a/TP5/a.out b/TP5/a.out index 3e71355e4634f2e5eddca58d1c5f742966cec9df..f4c157d82c72007cf98cb70fa91ca1c57c85a817 100755 GIT binary patch delta 1292 zcmZuxUr19?7(aJ+SC^@CN;ETRk)~ltf|4e4`f%t7niCOviR*SZo%wHW4z!RJn-AkM z)DA=iL5~(fmOc#e;jRW7;lmUXf`aHFTo`CizOC=v-GxYpegA&n`Of*B@9f-XAzlgb zOX+gE6(J5G^nocDcI)zw4pX@;hnD9+R8E^Xo2f=a8#T0sKIUxH%Na^)G-L>7=;@A7 zMGrZPDXh(}*Ro-HS!Xk?YADgrRXVL(6KP`4a&P?Zcqhb>6O_Rtc!u=sqAjRw7 zN3bH}Eg}s3gas+S5I2BU32u@|*WV2aVtQ~I|!xvy0iCV+3 z{TkXoud>(%jWWBSlK2FN*DA098t_=oB$x@!Cx9XbPsSUkC`xnRhC;jdrXU7mC#tW6aO<{00#4^n!sFsyrLO&w#+@`2+T{MFI+(O9?^( z3Od1P1v1`_;5E38QYa@f{CbZ`Tgtd_MqOi#gcA09ANN`RjAyg8tTbEuOVtOUd!p69 z!E_B|Yd<4|mOP+P<|pjvVSl2`SLR)1-Y$6PE=&I#dhpo7{0Yl27Uy&RnJMpei`U_| zOgKhHrvvUHBsqLOcRsXOEwwI75q)c`E@6+c8ETnStbei9buJI-&oyfgrX&Awm|foy zvaRdig@b~i=?WTv0%YnGMbSUwkj6yGGbWA%96lH7_o1au*W9=ZG6ARP9G!Hz0b=w0 zrz?gXqvMeB8(^gg_k`q~V^JAIUf<~C%y6y@HW!hAbmD|ZbkDjaI-*ooK41&NNNbK0 z{8G39c*@G9?)*pQBA{?f?4H%ZJ|rjOu2XUMskonV@rp_T&;k(F;X)ABZ55*}aZAI= S7N`gMPgAth(fjd6xW2#3Gf^P` delta 864 zcmZ8fQD{<882*pf+caq2+Xx)Xc4JAa!I-o$Vd-@b;tf`7)S`lLI+YEEGj-I8F~dC+ z!={`U2MdB8BG!Xt)Ox#8P>&MyRunyydoz6TL9qYm8H5M^|Np-4|NnE(x&P7ALOv~I z%SX#@00IDa(by`xbHCiOrnXgUTLg_dh)Q*0GCR34M;{PX&ht7WSM&6?p`TWXBJc1_ z56|q-lLl2Ta8=`K0qeJji4viY7^zLTPZYW>_+%y3{=SLVDfF)}P4aZoIOI4u6H6&N z06Wojj3XEgXe^&a&U&3CfI0faI3Y@i%(&!q_f` z$~41|yj5*;t*T|lwp*#$hL*WlFF<7+DQ@Cz)GRmk&6PSf-$AKBDg&$#dn)Yg4qZ!s zlx}@!+FyGBn)Wv>f8%W{?4h5^*xqB9ywbGi01vu=4)%XHo6Uu8hQ2Y>$Iuss*oF2# zBLYaNp+GV)j1J;pk0|z#av12YYCFQ7!zdOqyHNb9p7!*{_{{F{xWVJ&qMZ7pUXusl zDi(w639T-L{E6gB&>vikhQe`}i9;3=nDIyEmzEP@#!QSY$HGxYBt{bRfoOy=E3#O8 zF`7h1qx#w2HMTFVG6z$LyUjRt`bzI#KX|#vQNMNZ%#_z>%#P340rQv_`zQwQr 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