From 965589da20c7670b7dfffd1337227d52171af926 Mon Sep 17 00:00:00 2001 From: pourchot Date: Tue, 11 Oct 2022 11:28:13 +0200 Subject: [PATCH] 11 Octobre --- .../.nfs00000000008c1c9600000051 | Bin 0 -> 16712 bytes .../Boucles:suite/Boucles:encore/disque.c | 10 ++++++ .../Boucles:suite/Boucles:encore/diviseur.c | 29 ++++++++++++++++++ .../Boucles:suite/Boucles:encore/figures.c | 25 ++++++++++++++- 4 files changed, 63 insertions(+), 1 deletion(-) create mode 100755 DEV1.1/TP05:Boucles/Boucles:suite/Boucles:encore/.nfs00000000008c1c9600000051 create mode 100644 DEV1.1/TP05:Boucles/Boucles:suite/Boucles:encore/disque.c create mode 100644 DEV1.1/TP05:Boucles/Boucles:suite/Boucles:encore/diviseur.c diff --git a/DEV1.1/TP05:Boucles/Boucles:suite/Boucles:encore/.nfs00000000008c1c9600000051 b/DEV1.1/TP05:Boucles/Boucles:suite/Boucles:encore/.nfs00000000008c1c9600000051 new file mode 100755 index 0000000000000000000000000000000000000000..01787a6d83c37191a3d7255d8a794c329813dd3c GIT binary patch literal 16712 zcmeHOVQdt~6`u3i*aUnw#ExA^VM9SOZG9MHi~$kuY@fZZ&ftPg(iT{s@7DH~^PPLQ zm)a<_R3=eQjuR@SQj$K*9GC%j-613i4b)$^01Vnh}!S7r{=1T4+2PDC`GBeM`lqUbLT3 z+%DS^)rMMIwnQV1Q7x95Xq;$kZES7vCga{_e&6UHb-VWs@P=Uj60Uf84amr0`Rm%- zb7yXR=a*L}+BejF_thU&e{}C%w51EO|8bfCO{s|X8sJtJ;ny$0H!Z<;Ey2GAyabm$ ztpK7}y*~tAvMYnU1Fj84cn0wfV|ZJcqG-u@c;`+f84ksU*?3A%0+-Z7;bTg8^q4Xn z(xPlUp~duJ;KLIkWmt=aqS|p4M0A6?30)ZrX))Fv>}l^%n!P)6xt3h6*}I)7J^j5( zL`|q8T2faN{k zi6iG(!PRit&4z@WTB9vT>nO;WXdKhH8(d}bSuswDuNJ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q_KYqU;f62x-2%f%2LFDOa_;gv?N#nkk^NZuA1CRdc zdzm|dkCSk@Ua-vGa=q>j<|DXIJ(d6pm7;^%|C13boU zT*OTk1{VOUp&$17$b*SzNniBmEu#1X;8EW`zU~TrO`K!k|Cxf#ea;v9MyVFQm$ChJ zKTiQKEmmi{f!|PspGW^CMZPDsn5KKfES%7jdI~mKg<1ZTh@y`vVLT^-2U8+(Wh5FO z3PqKO9#15dP-=pO<74AdRaYb49nEccqNRuuo?6kAP$ChURPbNzNj97ajj2i`H8wU0 zCKgG-#uTVVwCA*>no2;k6s7Bczc-)+_H`<7NTpCW!j#T0?eq8cbQG5G6EZ--52zB5 zg$KFw08_ey``i6NWq()K!9c&#?{5zV&?`Sz6Hcahs~>r42G8sGe01)HpRrLRAw2|6 z3eWK5m0HAco;<_N?1y>m#pu;ModdoLkLoCqWLy~y#Ugl&r)NKCMYNcbN~#c${JmgU zK^{sbg&TfksPOzzzS13_3g?3;(0FjD=xLzBGf8=SyeH;OPLAoJAwWH0;wa_dK$Dsn zXWm#`SH1rBo<==1BBYU6$~y!vOd^e1gn3aK4JAjJH!>LmeJ}kg<+mS}zc`kfK0){Xe(a)4GE2s?FYB|16Zl?qog&P?hGtbWYf= zPcq>jzy@YXIeVJNW*gC4zQ34KUM72NANCzuM$&qQ&SB4Ca3E3tB0GAHe}ghqA$wZ) zTon_o1~j%LvM2mIlv(YWPbfE;*d{~*vLn0&1y*~SceV+8YNy?vLGos%bMjE=Cl|a6b@w(cpS%{hl|=n;~)Q@p|)Gh+1XZ8 XddB9Q>Lp!lUom?_1m0~ku!-#7pcUuV literal 0 HcmV?d00001 diff --git a/DEV1.1/TP05:Boucles/Boucles:suite/Boucles:encore/disque.c b/DEV1.1/TP05:Boucles/Boucles:suite/Boucles:encore/disque.c new file mode 100644 index 0000000..d6193c5 --- /dev/null +++ b/DEV1.1/TP05:Boucles/Boucles:suite/Boucles:encore/disque.c @@ -0,0 +1,10 @@ +#include +#include + +int main() { + int r; + printf("Veuillez saisir un rayon : "); + scanf("%d"&r); + +return 0; +} \ No newline at end of file diff --git a/DEV1.1/TP05:Boucles/Boucles:suite/Boucles:encore/diviseur.c b/DEV1.1/TP05:Boucles/Boucles:suite/Boucles:encore/diviseur.c new file mode 100644 index 0000000..b8f9ff9 --- /dev/null +++ b/DEV1.1/TP05:Boucles/Boucles:suite/Boucles:encore/diviseur.c @@ -0,0 +1,29 @@ +#include +#include + +int main() { + int a; + int b; + int c; + int d; + int e; + printf("Veuillez saisir 2 entiers naturels : "); + scanf("%d",&a); + scanf(" %d",&b); + if (b>a){ + c=a; + a=b; + b=c; + }if(b==0){ + printf("Le pgcd entre %d et %d est de %d\n",a,b,a); + }else{ + d=a; + e=b; + while(d!=0&&e!=0){ + c=d; + d=e; + e=c%e; + } printf("Le pgcd entre %d et %d est de %d\n",a,b,d); + } +return 0; +} \ No newline at end of file diff --git a/DEV1.1/TP05:Boucles/Boucles:suite/Boucles:encore/figures.c b/DEV1.1/TP05:Boucles/Boucles:suite/Boucles:encore/figures.c index e077386..09ac793 100644 --- a/DEV1.1/TP05:Boucles/Boucles:suite/Boucles:encore/figures.c +++ b/DEV1.1/TP05:Boucles/Boucles:suite/Boucles:encore/figures.c @@ -20,7 +20,30 @@ int main() { printf("*"); } printf("\n"); } - } + } else{ + if (n=='c'){ + printf("Hauteur ? "); + scanf("%d",&h); + for (i=1;i<=h;i++){ + for (j=1;j<=h;j++){ + if (j==1||j==h){ + printf("* "); + } else{ + if (i==1||i==h){ + printf("* "); + }else{ + printf(" "); + } + } + }printf("\n"); + } + }else{ + if(n=='q'){ + printf("Au revoir...\n\n"); + break; + } + } + } } return 0; } \ No newline at end of file