From 68f7eec7b9c69542ee6661118ef4c6e9feab991c Mon Sep 17 00:00:00 2001 From: pourchot Date: Tue, 27 Sep 2022 16:03:19 +0200 Subject: [PATCH] 27 Septembre --- .../.nfs0000000000462b9000000026 | Bin 16712 -> 0 bytes DEV1.1/TP03:Conditions/bissextile.c | 15 +++++++-- .../.nfs00000000005e220a00000065} | Bin 16712 -> 16664 bytes DEV1.1/TP04:Types/affluence.c | 25 ++++++++++++++ DEV1.1/TP04:Types/debordement.c | 11 +++++++ DEV1.1/TP04:Types/monnaie.c | 31 ++++++++++++++++++ DEV1.1/TP04:Types/variete.c | 6 ++++ 7 files changed, 86 insertions(+), 2 deletions(-) delete mode 100755 DEV1.1/TP02:Caracteres,Reels/.nfs0000000000462b9000000026 rename DEV1.1/{TP02:Caracteres,Reels/.nfs000000000046254e00000025 => TP04:Types/.nfs00000000005e220a00000065} (57%) create mode 100644 DEV1.1/TP04:Types/affluence.c create mode 100644 DEV1.1/TP04:Types/debordement.c create mode 100644 DEV1.1/TP04:Types/monnaie.c create mode 100644 DEV1.1/TP04:Types/variete.c diff --git a/DEV1.1/TP02:Caracteres,Reels/.nfs0000000000462b9000000026 b/DEV1.1/TP02:Caracteres,Reels/.nfs0000000000462b9000000026 deleted file mode 100755 index b1f7feeb5e6132d7195efd0d7995bed8fb80542d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16712 zcmeHOZ)_9E6(8FPF$Xw-3nhgsER;y0*O(AO2%sEx5+|D~ffN$%PY)Ky-XvQbJGIv| zq^*jS>-AikgAaT_Csn;`uN71$dS6=Ihqej|qPn&p0I4m#wo*7j6;8DHXhA6_aNnDq zXYZ~ZRPmuwr5$Pa&HKGSGxK(4J>#AEW~isr?Q$_n9`+nVZmh~c0z%;3DKbC;tc5Ls z`)AlQY!UEf95dtrgMidXBW^483fuz}?am6hojxPOqv``SK(*h9vQOo}NJkNJPzcSe3bYE@pGBR(jYL7qUYb?dFBuys#rWE6O8E z@x++mby4`W(+-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.c index cb04c40..c02a22a 100644 --- a/DEV1.1/TP03:Conditions/bissextile.c +++ b/DEV1.1/TP03:Conditions/bissextile.c @@ -1,6 +1,17 @@ #include int main(void) { - - return 0; + int n; + printf("Veuillez saisir une annee.\n"); + scanf("%d",&n); + if (n%400==0){ + printf("%d est une annee bissextile.\n",n); + } else{ + if (n%4==0 && n%100!=0){ + printf("%d est une annee bissextile.\n",n); + } else { + printf("%d n'est pas une annee bissextile.\n",n); + } + } + return 0; } \ No newline at end of file diff --git a/DEV1.1/TP02:Caracteres,Reels/.nfs000000000046254e00000025 b/DEV1.1/TP04:Types/.nfs00000000005e220a00000065 similarity index 57% rename from DEV1.1/TP02:Caracteres,Reels/.nfs000000000046254e00000025 rename to DEV1.1/TP04:Types/.nfs00000000005e220a00000065 index 0169f1e24102261d373df576650ad985d4945e3c..29d9c026fd3702f1ba164f86852a0a949e07e6a3 100755 GIT binary patch delta 1845 zcmZ8iYfKzf6h3z!z(ls4*|H34X?C~T6rtVO2g@#nWoO$W1J+1wP&Bb!EL&aEqP#Rd zlG>uS4Iw~JOl)F}_``%BMh%I@*z}Q_s<9^UqoxLbv?fHFG)e;|sIlX@^T5d6o%zoB z&bjBFz4x5E-yUc09cN<|-kb==P)&dv_2bna3l&ACS~32UBIF&Wl1GUtLW-GM3R_9* zv}`#%#!g68LDRO1=y%MOeT{*?+WLob^}C0j{<*U3$Upb$_G5`N#riSpR9Fr6I%SqM z-lN3GIOD8fA8?7qkh!9mbUosUg%i-Sr*-G91F>)|j=I`B4sg;3z(tP}Z@U8Z`$*zH zXYl@lKpZ?{>1Bn22fzUZ()n0On^b3VYo(%!Oy&GQRIF^(k1GJnW7whN><)AJ?MnlKesg``O}@qz3(5ag!#~l7b7G~#t>B;Hrs@Q7Fc|O9hSI-; zNz_iw4|ufUbUE?5Z-%IagSxI?rR-EGa#ZZrhFx2#49Dh`=p~9evJPOH2w1pyPuI1P z=4I{FRpQ51`E$e%H!q)TURr;lV~Hfg-oI);L3Sg8HvH&Hw-zro78r0Z>?gx_R}O{O z2j1cfz#%q(wc!ZP0t2iHgVDlN8|2j8i*NN{qc6o{%FP9cmk?bbw z4bI=i>d?ciYN|K%N+~6)3GG(R0N&lMuucqx>A3M&IKZZHBAj6w-UMXRyZqSIhq?E51>!lPK8rRE43Yq>u}m;c`=5O)ZRC;qy49o2eA+7 delta 1970 zcmZ8iYitx%6ux&K?T+boXUcA77lEB(8W3ckh3$iNr{K~dsYx4bz#oPdyQOQe-L_jI z1=5zHLQ0dufrOZlP$gz10U?bFQ4mr@kw3x@BKijmB#UX{E(ZeM(gu}w(Z>tAD$D;z zWoWUlq;}Yg9OJMwLLs5^n9Tua>>}mh8+)UVr*^xW!yQWiTEu9RL?r(Jeg3&i7KB@eCAN}7WaNwmvIZiW-m3rpLPbsSOBP|m++S??^dKv^l) zD84S)gHOHyzepQwJO+W5@Pet~iuN+D&8S))imQV308|FHQZI}I{PYq`1`@Ol?g#ur zfu)6m)gc=p5P}I>fR>=2-htlW*Fq=zaGn`5)P}ymNX3wdjAF=Rb&vv7hS~Sq682c1 zL#-v;NHZ{kS~)oY=fgqN?js|Ivj@r}gR};EBOa@lC@>k>N>2ifioPG_?Zm3gLY#Og z;iyOz*cc6B*1MvcxzmVHB9J|BH@b{o09q~jZfG_)nKiy)Gv(V5M)aYk^2BUQCOQl4 zh?ZluRp3s;6}sIx6tV;kBYFx^iHM{|HobIN2gPbJ+=M8Ps4@@rvX~Zpe^^3kn=rCk9Qujv!p_LpC1t?ZQ1Zk}nq`x(%bdYC zdp`U6+4xn<0q;ZB)VYcE9~M7tRFhVQi2kkF3H(tl_&nHbS%&j{E1_YHXs<_!3irutIY!y_>eSTmR9XZrZmwb*NxDY34SViDHX2L-Q9&&8CNU>92N7* + +int main(void) { + int n; + int m; + m=0; + printf("Indiquez le nombre de visiteurs lundi.\n"); + scanf(" %d",&n); + m=m+n; + printf("Indiquez le nombre de visiteurs mardi.\n"); + scanf(" %d",&n); + m=m+n; + printf("Indiquez le nombre de visiteurs mercredi.\n"); + scanf(" %d",&n); + m=m+n; + printf("Indiquez le nombre de visiteurs jeudi.\n"); + scanf(" %d",&n); + m=m+n; + printf("Indiquez le nombre de visiteurs vendredi.\n"); + scanf(" %d",&n); + m=m+n; + m=m/5; + printf("Le nombre de visiteurs journalier moyen est de %d\n",m); + return 0; +} \ No newline at end of file diff --git a/DEV1.1/TP04:Types/debordement.c b/DEV1.1/TP04:Types/debordement.c new file mode 100644 index 0000000..4f071b8 --- /dev/null +++ b/DEV1.1/TP04:Types/debordement.c @@ -0,0 +1,11 @@ +#include + +int main(void) { + int n; + char c; + printf("Veuillez saisir un entier.\n"); + scanf("%d",&n); + c=n; + printf("%d,%c\n",n,c); + return 0; +} \ No newline at end of file diff --git a/DEV1.1/TP04:Types/monnaie.c b/DEV1.1/TP04:Types/monnaie.c new file mode 100644 index 0000000..0bfd157 --- /dev/null +++ b/DEV1.1/TP04:Types/monnaie.c @@ -0,0 +1,31 @@ +#include + +int main(void) { + float r; + int p1; + int p2; + int p3; + float ar; + float p; + p=5.49; + p1=0; + p2=0; + p3=0; + ar=0; + r=0; + printf("Veuillez saisir la monnaie donner par le client.\n"); + scanf("%f",&r); + ar=r-p; + while (ar>=2){ + ar=ar-2; + p1+=1; + } while (ar>=0.20){ + ar=ar-0.20; + p2+=1; + } while (ar>=0.01){ + ar=ar-0.01; + p3+=1; + } + printf("Pour rendre la monnaie, il faudra %d pieces de 2euros, %d pieces de 20centimes et %d pieces de 1centime.\n",p1,p2,p3); + return 0; +} \ No newline at end of file diff --git a/DEV1.1/TP04:Types/variete.c b/DEV1.1/TP04:Types/variete.c new file mode 100644 index 0000000..8692078 --- /dev/null +++ b/DEV1.1/TP04:Types/variete.c @@ -0,0 +1,6 @@ +#include + +int main(void) { + printf("%d,77,%f,%c%c,%lf\n",77,77.0,'7','7',77.0); + return 0; +} \ No newline at end of file