From 5dadaa382863985f1e735d3334bc6a1e63cd6aee Mon Sep 17 00:00:00 2001 From: Vieira Date: Tue, 12 Oct 2021 17:22:38 +0200 Subject: [PATCH] te --- Dev1.1/Tableaux/Max | Bin 0 -> 16384 bytes Dev1.1/Tableaux/Maximum.c | 64 ++++++++++++++++++++++++++++++++++ Dev1.1/Tableaux/Mirroir.c | 64 ++++++++++++++++++++++++++++++++++ Dev1.1/Tableaux/Remplissage | Bin 0 -> 16336 bytes Dev1.1/Tableaux/Remplissage.c | 34 ++++++++++++++++++ Dev1.1/Tableaux/mir | Bin 0 -> 16376 bytes Dev1.1/Tableaux/mirroir.c | 51 +++++++++++++++++++++++++++ Dev1.1/Tableaux/recherche.c | 41 ++++++++++++++++++++++ 8 files changed, 254 insertions(+) create mode 100755 Dev1.1/Tableaux/Max create mode 100644 Dev1.1/Tableaux/Maximum.c create mode 100644 Dev1.1/Tableaux/Mirroir.c create mode 100755 Dev1.1/Tableaux/Remplissage create mode 100644 Dev1.1/Tableaux/Remplissage.c create mode 100755 Dev1.1/Tableaux/mir create mode 100644 Dev1.1/Tableaux/mirroir.c create mode 100644 Dev1.1/Tableaux/recherche.c diff --git a/Dev1.1/Tableaux/Max b/Dev1.1/Tableaux/Max new file mode 100755 index 0000000000000000000000000000000000000000..c2bca3574ca81391e38f93fb924bd241dac46c20 GIT binary patch literal 16384 zcmeHOeQX@X6`woX#18SSM^;!hgiMSB{mQUP z=x&rnP(rG=+mp~4MB<+|K7jeB#``2MZZPiw>n6E(h3mr_jpzRvCFzx6+*;)6z+>?9s+#Yu9Uf;R<-!*biq79A% zW16YqL@A2 z=EeADfS2HM%Pl}$)`qGTU5+Bc=5>RH46@YB?SRobnq8C_?nQVU<{m_BvQyK zAuk?{oTzv3&ik;*!Q&W6T0&L{JG2|hkwkRR1i2N#>^$K1FybO35@G{_K zz{`M_fp0DYA5~rPxib82xiV7r*A0v*4~`ptb4D4SEI+{;F>ibmXtVAu_^hf8K?(H% ztec-TLF!&Z9hXk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Yd%AA~&2~Y- z$JVjEA&a5!S>^m1M)!eL%h+KkU>v#+iT^pbzu4YKOZ+oX_;1Gb2OeiNd*Dinu!P0p zyvVCB{!%|*<8jt9_q_PKu&4WP+_GCd^M}Fzb~q70DiT{cq z7x0q9j*1E3uOh{P&n+`v7U|O)lPN4BTam~kOlcP-IvS;2h*uREo~fdP<>e)&LZhCL4{kp8gU{A(R?718DPQK zfh06xp^>&~_G{^ko=O%dD%7R5cmy3pX)tcEAkRq9&~i}52@G{9{^bU>0WoCT>FuKi|{85L7h`*T}a$!C^-Fd!k-X-e{c#tpNZ>&g43VYH-r)y3UvG5 z0sN=1mZbjE`kIi&PwQ)U|0Cd!YishS^*3P)CKm+zh(+?Jb+8T`4w?LEJx@sMcQD~1 z!jZ~;03}>2lRvGG3F*Cp`cHO*hrl1#-lWs|n=m9=a`#`*Y!nKZQ}U6?QyPSjGlHj#$9EgYO(}|K9?KIidLYUpW_n^qwVH-d8FkJ_eW5UlM+VLulj> zS9tb2sB`*1E({2NA?7oMAb--Ia{1FbijdwT$=*GGpA-I+e)c(_wWl4C(QteN7`>#Sx04_=st&i!vsoS1(!Z*OT%HdD%4GWDx zf{>l1E$PIcg$kTI)IP1->HP344h}?2M>`&Uj~_!Fnvg%8!#g7udiCh+5Nen3GpKX= zvyd=uvam;}1ms8P2WO{0t%rMrKlRh?Z|mTUv8exhLsrdR;ZN<5J+|ePO3}VBx2wqC zy@n=#C(_)pouQBu0r^gM(D6Bp@2b=vdVW>_M}3E)Ewjy5@gY}mYL^UgnO)3(;3muB K5|@KZW&Z|eM41c# literal 0 HcmV?d00001 diff --git a/Dev1.1/Tableaux/Maximum.c b/Dev1.1/Tableaux/Maximum.c new file mode 100644 index 0000000..913df73 --- /dev/null +++ b/Dev1.1/Tableaux/Maximum.c @@ -0,0 +1,64 @@ +#include +#include +#include + + + +int main(void){ + srand(time(NULL)); + int i; + int y = 0; + int tab [10]; + int max = 0; + int v; + int j; + int vrai; + while (y<10) { + tab[y] = rand()%101-50; + if (tab[y] > max) { + max = tab[y]; + } + y=y+1; + } + for (i=0; i<10; i++){ + printf("+-----"); + } + printf("+"); + printf("\n"); + for (i=0; i<10; i++){ + printf("|%4d ",tab[i]); + } + printf("|"); + printf("\n"); + for (i=0; i<10; i++){ + printf("+-----"); + } + printf("+"); + printf("\n"); + printf("Le Maximum est : %d\n",max); + printf("\n"); + printf("Entrez une valeur : "); + scanf("%d",&v); + for (j=0;j<=10;j++){ + if (tab[j]== v){ + printf("l'indice minimal de la valeur est : %d\n",j); + vrai = ""; + break; + } + if (j==10){ + vrai = -1; + break; + } + + } + + printf("%d\n",vrai); + + + return EXIT_SUCCESS; + + + +} + + diff --git a/Dev1.1/Tableaux/Mirroir.c b/Dev1.1/Tableaux/Mirroir.c new file mode 100644 index 0000000..0435c77 --- /dev/null +++ b/Dev1.1/Tableaux/Mirroir.c @@ -0,0 +1,64 @@ +#include +#include +#include + + + +int main(void){ + srand(time(NULL)); + int i; + int y = 0; + int w = 0; + int tab [10]; + int max = 0; + int v; + int j; + int vrai; + while (y<10) { + tab[y] = rand()%101-50; + if (tab[y] > max) { + max = tab[y]; + } + y=y+1; + } + for (i=0; i<10; i++){ + printf("+-----"); + } + printf("+"); + printf("\n"); + for (i=0; i<10; i++){ + printf("|%4d ",tab[i]); + } + printf("|"); + printf("\n"); + for (i=0; i<10; i++){ + printf("+-----"); + } + printf("+"); + printf("\n"); +} + + printf("%d\n",vrai); + printf("Mirroir :\n") + while (w<10) { + tab[w] = rand()%101-50; + w=w+1; + } + for (i=0; i<10; i++){ + printf("+-----"); + } + printf("+"); + printf("\n"); + for (i=9; i<=0; i--){ + printf("|%4d ",tab[i]); + } + printf("|"); + printf("\n"); + for (i=0; i<10; i++){ + printf("+-----"); + } + printf("+"); + printf("\n"); +} + return EXIT_SUCCESS; +} diff --git a/Dev1.1/Tableaux/Remplissage b/Dev1.1/Tableaux/Remplissage new file mode 100755 index 0000000000000000000000000000000000000000..deb8e09c1196e622d2a917f64e94658686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7P;d9Ah^4#K}9tqDE0e<+St6eHqfl@ZD`mZY*kwW zwar0{D)%Xbk}277-qqmeJqrJJXF?>b=^BK|-W`$QSJD263?KvAH%DYy<)(`)1QHF6 znA;zqsqDQFYB(8JyI`LN?vrTR3tr)9Oid*t=EenuTmqqqokE|AiFL|U#*V;kq2~&1)4fcsd61~DFM`UL#Wi-?$aZE zP{*+fwzxcpzDO61&aN&BRX9zq0yMSR%I6nSF%R-W$n+Uz@ z{J#JOE8j~zmc2|QX$vo2wDI}(o8?b3i7^8(pTmCN#^?DFOMWh7fBX3TG4V6ac*&C_ zO%DjXd;Gry7Ce6D&$mC61K8Vt)y7x6rYFnGOeD$YkKx}z1(w9hYXC8x_wxQxyFcqJ z-vUmNh0o6e(-jzPZoHV&^2Ll@@rzP!sc zfh$Lnr7)l64X|1H!cWeXrc_8}!9133AY1u7&sB)e{j~ElI*>6I_n+sD2Z+z@us^nC zE#~uwxi{B}Gv7WpX1-PO*t7C`sr?ojaCjfaXHf1B-`5rc#(lT)hw)`Ml%y>Sn literal 0 HcmV?d00001 diff --git a/Dev1.1/Tableaux/Remplissage.c b/Dev1.1/Tableaux/Remplissage.c new file mode 100644 index 0000000..d254531 --- /dev/null +++ b/Dev1.1/Tableaux/Remplissage.c @@ -0,0 +1,34 @@ +#include +#include +#include + + + +int main(void){ +srand(time(NULL)); +int i; +int y = 0; +int tab [10]; +while (y<10) { + tab[y] = rand()%101-50; + y=y+1; +} +for (i=0; i<10; i++){ + printf("+-----"); +} +printf("+"); +printf("\n"); +for (i=0; i<10; i++){ + printf("|%4d ",tab[i]); +} +printf("|"); +printf("\n"); +for (i=0; i<10; i++){ + printf("+-----"); +} +printf("+"); +printf("\n"); + + +return EXIT_SUCCESS; +} diff --git a/Dev1.1/Tableaux/mir b/Dev1.1/Tableaux/mir new file mode 100755 index 0000000000000000000000000000000000000000..133f67371b6663a4503e9121a15d6f0b8700dfc4 GIT binary patch literal 16376 zcmeHOeQX@X6`woX#3}gf1cx3F;%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8j}Gr)SayiUxJrWPc1D zs5H=Th>#q3$Vd)B87D5(W#l;wCHrWq_9eiVHOs@Avz7;!A#g0E$D!2>#DbrYY`_Wz zi4`HZbW(6d6uC@4D~0P%xa8q)i6uc=7clbrld7dHml3ao1J``)-%S3DVW@KouLqgi z1O=!65cxCWdkv@X{g=58C^-FjUBjrbA)(v<2H-z{H6-_+*VT+XeqL9*`yT^;TvM|@ zue%wWF}WbvM=Y{GuYYymaLDY>>v%?9w}Xik3dgGW4wP_>%>KMCX5{Ay?mycx?gM{Z zbF`$=!eMz&I2zr|i$`e#Qwh!{QV3#%n8TG zKh;tQ`T2@i*;g(jJ`9J`Um-un5j1j$E4=t6)H(eRkpbg=n$H}9{aOEw%b(XtjQsq_ z_U`%n2lD6q3xzBRdHxc6-uSKc?z!`~lKlwrouX6R?c@3v$ItEWR4i-8la^}#^7&`t z?@$Q9!D-@kF@I<3wr8F374WTe`15n~d_9mLY-efbbmrfH3Y!RkMfuxgEC0wwzKy?UT7(#s2O!GW$D`=Z@_Rg&_(kcesO&^BA8|xj%gW kTnZfb9g4Qh(8L{a1?P6z5SP)#{P%p#vbe +#include +#include + + + +int main(void){ + srand(time(NULL)); + int i; + int j; + int y = 0; + int z = 0 ; + int tab [10]; + while (y<10) { + tab[y] = rand()%101-50; + y=y+1; + } + for (i=0; i<10; i++){ + printf("+-----"); + } + printf("+"); + printf("\n"); + for (i=0; i<10; i++){ + printf("|%4d ",tab[i]); + } + printf("|"); + printf("\n"); + for (i=0; i<10; i++){ + printf("+-----"); + } + printf("+"); + printf("\n"); + printf("mirroir ; \n"); + for (i=0; i<10; i++){ + printf("+-----"); + } + printf("+"); + printf("\n"); + for (j=9; j>-1; j--){ + printf("|%4d ",tab[j]); + } + printf("|"); + printf("\n"); + for (i=0; i<10; i++){ + printf("+-----"); + } + printf("+"); + printf("\n"); + return EXIT_SUCCESS; +} + diff --git a/Dev1.1/Tableaux/recherche.c b/Dev1.1/Tableaux/recherche.c new file mode 100644 index 0000000..3d55c39 --- /dev/null +++ b/Dev1.1/Tableaux/recherche.c @@ -0,0 +1,41 @@ +nclude +#include +#include + + + +int main(void){ +srand(time(NULL)); +int i; +int y = 0; +int tab [10]; +int max = 0; +while (y<10) { +tab[y] = rand()%101-50; +if (tab[y] > max) { +max = tab[y]; +} +y=y+1; +} +for (i=0; i<10; i++){ +printf("+-----"); +} +printf("+"); +printf("\n"); +for (i=0; i<10; i++){ +printf("|%4d ",tab[i]); +} +printf("|"); +printf("\n"); +for (i=0; i<10; i++){ +printf("+-----"); +} +printf("+"); +printf("\n"); +printf("Le Maximum est : %d\n",max); + + +return EXIT_SUCCESS; +} + +