From d770a781f806d7ff2802a3c75bd8c3ccd4e1e11f Mon Sep 17 00:00:00 2001 From: Felix-Vimalaratnam Date: Tue, 24 Oct 2023 15:42:53 +0200 Subject: [PATCH] CM fait --- DEV1.1/CM1/exo1.c | 15 +++++++++++++++ DEV1.1/CM1/exo2.c | 9 +++++++++ DEV1.1/CM1/exo3.c | 32 ++++++++++++++++++++++++++++++++ DEV1.1/CM1/exo4.c | 19 +++++++++++++++++++ DEV1.1/CM1/exo5.c | 25 +++++++++++++++++++++++++ DEV1.1/felix-vi_CM1.tar.gz | Bin 0 -> 926 bytes 6 files changed, 100 insertions(+) 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/felix-vi_CM1.tar.gz diff --git a/DEV1.1/CM1/exo1.c b/DEV1.1/CM1/exo1.c new file mode 100644 index 0000000..5670761 --- /dev/null +++ b/DEV1.1/CM1/exo1.c @@ -0,0 +1,15 @@ +#include +#include + +int main(void) { + char apostrophe='"'; + printf(" {o,o}\n"); + printf(" (__(\\"); + printf("\n"); + printf(" -"); + printf("%c",apostrophe); + printf("-"); + printf("%c",apostrophe); + printf("-\n"); + return EXIT_SUCCESS; +} \ 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..41a1423 --- /dev/null +++ b/DEV1.1/CM1/exo2.c @@ -0,0 +1,9 @@ +#include +#include + +int main(void) { + printf("%d\n", 57); + printf("%o\n", 057); + printf("%x\n", 0x57); + 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..108a481 --- /dev/null +++ b/DEV1.1/CM1/exo3.c @@ -0,0 +1,32 @@ +#include +#include + +int main(void) { + double taille; + int pouce, pouces,pied, pieds; + printf("Entrez votre taille :"); + scanf("%lf",&taille); + taille*=100; + if ((taille/2.56)>1){ + pouces=taille/2.56; + if ((pouces/12)>1){ + pieds=pouces/12; + pouces-=pieds*12; + printf("%d pieds et %d pouces\n",pieds,pouces); + } else if ((pouces/12)>1 && (pouces-(pouces/12)==1)){ + pieds=pouces/12; + pouces-=pieds*12; + printf("%d pieds et %d pouce\n",pieds,pouces); + } else if ((pouces/12)==1){ + pied=pouces/12; + pouces-=pieds*12; + printf("%d pied et %d pouce\n",pied,pouces); + } else{ + printf("%d pouces\n",pouces); + } + } else{ + pouce=taille/2.56; + printf("%d pouce\n",pouce); + } + 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..3f4dcf2 --- /dev/null +++ b/DEV1.1/CM1/exo4.c @@ -0,0 +1,19 @@ +#include +#include + +int main(void) { + char lettre_choisi, lettre='a'; + int alphabet; + printf("Entrez une minuscule :"); + scanf("%c",&lettre_choisi); + for (alphabet=0;alphabet<26;alphabet++){ + if (lettre==lettre_choisi){ + printf("[%c]",lettre_choisi); + } else { + printf("%c",lettre); + } + lettre++; + } + printf("\n"); + return EXIT_SUCCESS; +} \ 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..b286fce --- /dev/null +++ b/DEV1.1/CM1/exo5.c @@ -0,0 +1,25 @@ +#include +#include +#define NBR_DEE 5 + +int main(void) { + int score[NBR_DEE]; + int dee1,dee2=0,occurence,valeur_occurance=7; + for (dee1=0;dee10){ + valeur_occurance=score[dee1]; + } + dee2++; + } + printf("Occurrences maximum : %d\n",occurence); + return EXIT_SUCCESS; +} \ No newline at end of file diff --git a/DEV1.1/felix-vi_CM1.tar.gz b/DEV1.1/felix-vi_CM1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..90ed299150a34e178253025a7b1469865fbe1c85 GIT binary patch literal 926 zcmb2|=3oE==C={I^KLl^Ji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