From 3ada35614fe999a6897e6467f591d05dea73d2cf Mon Sep 17 00:00:00 2001 From: moogin Date: Tue, 22 Oct 2024 15:14:54 +0200 Subject: [PATCH] oublie --- DEV1.1/CM1/exo1.c | 12 +++ DEV1.1/CM1/exo2.c | 15 ++++ DEV1.1/CM1/exo3.c | 30 +++++++ DEV1.1/CM1/exo4.c | 8 ++ DEV1.1/CM1/exo5.c | 77 ++++++++++++++++++ DEV1.1/CM1/moogin_CM1.tar.gz | Bin 0 -> 45 bytes DEV1.1/{ => boucles}/boucles.c | 0 .../boucles_encore.c} | 0 DEV1.1/{ => boucles}/boucles_suite.c | 0 DEV1.1/chaine.c | 7 ++ DEV1.1/debogueur.c | 4 +- DEV1.1/moogin_CM1.tar.gz | Bin 0 -> 3037 bytes .../{ => tableaux}/tableau_multidimensionel.c | 0 DEV1.1/{ => tableaux}/tableaux.c | 0 DEV1.1/{ => tableaux}/tableaux_multi.c | 7 +- DEV1.1/types.txt | 14 ++++ 16 files changed, 170 insertions(+), 4 deletions(-) create mode 100644 DEV1.1/CM1/exo1.c create mode 100644 DEV1.1/CM1/exo2.c create mode 100644 DEV1.1/CM1/exo3.c create mode 100644 DEV1.1/CM1/exo4.c create mode 100644 DEV1.1/CM1/exo5.c create mode 100644 DEV1.1/CM1/moogin_CM1.tar.gz rename DEV1.1/{ => boucles}/boucles.c (100%) rename DEV1.1/{boucle_encore.c => boucles/boucles_encore.c} (100%) rename DEV1.1/{ => boucles}/boucles_suite.c (100%) create mode 100644 DEV1.1/chaine.c create mode 100644 DEV1.1/moogin_CM1.tar.gz rename DEV1.1/{ => tableaux}/tableau_multidimensionel.c (100%) rename DEV1.1/{ => tableaux}/tableaux.c (100%) rename DEV1.1/{ => tableaux}/tableaux_multi.c (98%) create mode 100644 DEV1.1/types.txt diff --git a/DEV1.1/CM1/exo1.c b/DEV1.1/CM1/exo1.c new file mode 100644 index 0000000..513abda --- /dev/null +++ b/DEV1.1/CM1/exo1.c @@ -0,0 +1,12 @@ +#include +#include + +int main(void){ + printf(" .-\"-. \n"); + printf(" _/.-.-.\\_ \n"); + printf("( ( 0 0 ) ) \n"); + printf(" |/ \" \\| \n"); + printf(" \\ .-. / \n"); + printf(" /`\"\"\"`\\ \n"); + printf(" / \\ \n"); +} \ No newline at end of file diff --git a/DEV1.1/CM1/exo2.c b/DEV1.1/CM1/exo2.c new file mode 100644 index 0000000..f05e252 --- /dev/null +++ b/DEV1.1/CM1/exo2.c @@ -0,0 +1,15 @@ +#include +#include + +int main(void) { + float a = 1; + unsigned int b = 11; + char c = 111; + short int d = 1111; + + printf("%e\n", a); + printf("%7o\n", b); + printf("%c\n", c); + printf("%2hd\n", d); + return EXIT_SUCCESS; +} \ No newline at end of file diff --git a/DEV1.1/CM1/exo3.c b/DEV1.1/CM1/exo3.c new file mode 100644 index 0000000..c47efe7 --- /dev/null +++ b/DEV1.1/CM1/exo3.c @@ -0,0 +1,30 @@ +#include +#include + +int main(void){ + char charactere; + char tab[6]={'a','e','i','o','y'}; + printf("entrez un charactère : "); + scanf("%c", &charactere); + + if(charactere == 'a'){ + printf("voyelle"); + }else if(charactere == 'e'){ + printf("voyelle"); + }else if(charactere == 'i'){ + printf("voyelle"); + }else if(charactere == 'o'){ + printf("voyelle"); + }else if(charactere == 'u'){ + printf("voyelle"); + }else if(charactere == 'y'){ + printf("voyelle"); + }else{ + printf("minuscule"); + } + + printf("\n"); + + + return EXIT_SUCCESS; +} \ No newline at end of file diff --git a/DEV1.1/CM1/exo4.c b/DEV1.1/CM1/exo4.c new file mode 100644 index 0000000..59a9fad --- /dev/null +++ b/DEV1.1/CM1/exo4.c @@ -0,0 +1,8 @@ +#include +#include +#include +int main(void) { + double proba=0; + proba = (15/36)*100; + printf("%.2f\n", proba); +} \ No newline at end of file diff --git a/DEV1.1/CM1/exo5.c b/DEV1.1/CM1/exo5.c new file mode 100644 index 0000000..1cec1cb --- /dev/null +++ b/DEV1.1/CM1/exo5.c @@ -0,0 +1,77 @@ +#include +#include + +int main(void) { + int tab[10][10]{{'x','x','x','x','x','x','x','x','x','x' }, + {'x','x','x','x','x','x','x','x','x','x'}, + {'x','x','x','x','x','x','x','x','x','x'}, + {' ',' ',' ',' ',' ',' ',' ','x','x','x'}, + {' ','x','x','x','x','x','x','x','x','x'}, + {' ','x','x','x','x','x','x','x','x','x'}, + {' ','x','x','x','x','x','x','x','x','x'}, + {' ','x','x','x','x','x','x','x','x','x'}, + {' ','x','x','x','x','x','x','x','x','x'}, + {' ','x','x','x','x','x','x','x','x','x'} }; + int x =7; + int y =4; + char direction; + int ysortie; + int xsortie; + int i; + + + + for (i = 0; i<= i; i++){ + printf("vers ou ? "); + scanf("%c", direction); + if(y == ysortie && x=xsortie){ + return EXIT_SUCCESS; + }else if(direction == 'N'){ + + y+=1; + if (tab[y][x]=' '){ + printf("ok"); + }else{ + printf("bloquer"); + y-=1; + } + + }else if(direction == 'S'){ + + y-=1; + if (tab[y][x]=' '){ + printf("ok"); + }else{ + printf("bloquer"); + y+=1; + } + }else if(direction == 'E'){ + + x+=1; + if (tab[y][x]=' '){ + printf("ok"); + }else{ + printf("bloquer"); + x-=1; + } + + }else if(direction == 'O'){ + + x-=1; + if (tab[y][x]=' '){ + printf("ok"); + } + }else{ + printf("bloquer"); + x+=1; + } + + } + } +} + + + + + +} \ No newline at end of file diff --git a/DEV1.1/CM1/moogin_CM1.tar.gz b/DEV1.1/CM1/moogin_CM1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..872c01559ea7ac2302b7d73ae653f7ad29f8981d GIT binary patch literal 45 qcmb2|=3oE==C=nKd4a4$3%>j3@|iDyhyuw5bLLt1WYrlo7#IN4*9i&$ literal 0 HcmV?d00001 diff --git a/DEV1.1/boucles.c b/DEV1.1/boucles/boucles.c similarity index 100% rename from DEV1.1/boucles.c rename to DEV1.1/boucles/boucles.c diff --git a/DEV1.1/boucle_encore.c b/DEV1.1/boucles/boucles_encore.c similarity index 100% rename from DEV1.1/boucle_encore.c rename to DEV1.1/boucles/boucles_encore.c diff --git a/DEV1.1/boucles_suite.c b/DEV1.1/boucles/boucles_suite.c similarity index 100% rename from DEV1.1/boucles_suite.c rename to DEV1.1/boucles/boucles_suite.c diff --git a/DEV1.1/chaine.c b/DEV1.1/chaine.c new file mode 100644 index 0000000..b335729 --- /dev/null +++ b/DEV1.1/chaine.c @@ -0,0 +1,7 @@ +#include +#include + +int main(void){ + printf("https://iut-fbleau.fr/sitebp/dev11bis/files/maquette.svg"); + +} diff --git a/DEV1.1/debogueur.c b/DEV1.1/debogueur.c index 8c13fce..d2d02b9 100755 --- a/DEV1.1/debogueur.c +++ b/DEV1.1/debogueur.c @@ -13,4 +13,6 @@ int main(void) { printf("Le double vaut %d\n", somme(*p, *p)); return EXIT_SUCCESS; -} \ No newline at end of file +} +a + diff --git a/DEV1.1/moogin_CM1.tar.gz b/DEV1.1/moogin_CM1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..81da53133f88df34529cce86b299ea47d834469b GIT binary patch literal 3037 zcmZwIc{~#i1IKYk2)W6Wm1V1uE6ur>Qjrdmbdg2m$PBr!Q7lQWv2m5(Jo*zg+dSL@B;<2|Np^tf*dNpGr$R>GD{N z?4>`f>~{{I>_3v|_T5Ps*gckzt6B{p$1!y44eLf#xJ80)o{ZDCG-Qb@S4{m^Fjw7O zR_Xm88Qc*;0ZM$=Rk^N49?|||sOAggbaG7&GRTEP5zW#pOm+qOAPp3*w7(nnzj{OA z)q0?CTt|iu9*ML2vv&GhQs#9k3?f*$1RcJ;%rw@V`m9vbyyX8&Pa7Xs)_R*ngr(|? z^?$Wf>Hk@KrmmX$c6C^rR^oWDHp9PGUyo2RBz_T{Z+a4D92)3((=?Jq#;&i=5O8k` zbr^h=X*O#AR#IJzIi1guIlq3AIKfY=094TVG3{%7O4Fj~4xJHxD&9{iRBjrHc?P6I zSf$CEG?8%&^`8hyg5XD}6RqOj{N-}TVI|IJ<0nmccV}^|W4LM+%Y0FNxE|uE@z-0` z<$CnwT;>(Ryo|h=I$3gJprhq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Njxa$o-mRiak+ybsFN ZuAb)|>iPEnZIrB|vfeu93xo;?{0D!4E8qYC literal 0 HcmV?d00001 diff --git a/DEV1.1/tableau_multidimensionel.c b/DEV1.1/tableaux/tableau_multidimensionel.c similarity index 100% rename from DEV1.1/tableau_multidimensionel.c rename to DEV1.1/tableaux/tableau_multidimensionel.c diff --git a/DEV1.1/tableaux.c b/DEV1.1/tableaux/tableaux.c similarity index 100% rename from DEV1.1/tableaux.c rename to DEV1.1/tableaux/tableaux.c diff --git a/DEV1.1/tableaux_multi.c b/DEV1.1/tableaux/tableaux_multi.c similarity index 98% rename from DEV1.1/tableaux_multi.c rename to DEV1.1/tableaux/tableaux_multi.c index aaeb490..535c169 100644 --- a/DEV1.1/tableaux_multi.c +++ b/DEV1.1/tableaux/tableaux_multi.c @@ -74,13 +74,14 @@ int main(void) { for (i=4; i<5;i++){ t3[4][i] = 0; printf("%2d ", t3[4][i]); - } + } + printf("\n"); return EXIT_SUCCESS; } -int main(void) { +/*int main(void) { int i,t1[2][5], t2[3][5], t3[5][5]; for (i=0; i<5;i++){ @@ -150,4 +151,4 @@ printf("\n"); printf("%2d\n ", t3[4][i]); } return EXIT_SUCCESS; -} \ No newline at end of file +}*/ \ No newline at end of file diff --git a/DEV1.1/types.txt b/DEV1.1/types.txt new file mode 100644 index 0000000..f730f2c --- /dev/null +++ b/DEV1.1/types.txt @@ -0,0 +1,14 @@ +signed char 8 %c, %hhd, %hhi 'Y' +unsigned char 8 %c, %hhu, %hho, %hhx, %hhX 'z' +short int 16 %hd, %hi +unsigned short int 16 %hu, %ho, %hx, %hX +int 32 %d, %i -24 +unsigned int 32 %u, %o, %x, %X 97U +long int 64 %ld, %li -148L +unsigned long int 64 %lu, %lo, %lx, %lX 4UL + +Et voici tous les types réels prédéfinis en C : +Type Nombre usuel de bits Formats Exemple +float 32 %f, %e, %E, %g, %a 1.5f +double 64 %lf, %le, %lE, %lg, %la 87.2 +long double 128 %Lf, %Le, %LE, %Lg, %La 4.61L \ No newline at end of file