From dc767c9f72f385685dd11d97f69479605105b9e3 Mon Sep 17 00:00:00 2001 From: Moncef STITI Date: Sun, 18 Feb 2024 15:18:07 +0100 Subject: [PATCH] Ajout des exo 2 et 3 du TP4 --- .gitignore | 54 ---------- BUT1/CONTROLE/controle.md | 4 +- BUT1/DEV1.1/CM2 2022/1/repetition | Bin BUT1/DEV1.1/CM2_2/CM2/carre | Bin .../EXO 1/.vscode/c_cpp_properties.json | 18 ---- .../SUJET1 /EXO 1/.vscode/launch.json | 24 ----- .../SUJET1 /EXO 1/.vscode/settings.json | 37 ------- .../EntrainementDS2/SUJET1 /EXO 1/Makefile | 14 --- .../EntrainementDS2/SUJET1 /EXO 1/main.c | 25 ----- .../SUJET1 /EXO 1/repetition.c | 13 --- .../SUJET1 /EXO 1/repetition.h | 6 -- .../SUJET1 /EXO 1/repetition_ou_pas | Bin 15664 -> 0 bytes .../CM2_2/EntrainementDS2/SUJET1 /EXO2/exo2.c | 26 ----- .../CM2_2/EntrainementDS2/SUJET1 /EXO2/image | Bin 1066 -> 0 bytes .../EntrainementDS2/SUJET1 /EXO2/image(2) | Bin 1066 -> 0 bytes .../CM2_2/EntrainementDS2/SUJET1 /EXO3/exo3.c | 23 ---- .../EntrainementDS2/SUJET1 /Lenny/main.c | 0 .../EntrainementDS2/SUJET1 /Lenny/nom1.c | 0 .../SUJET2/EXO1/valeurs_nulles | Bin .../SUJET2/EXO1/valeurs_nulles_ou_pas | Bin BUT1/DEV1.1/Organisation_code/exo1/exo1 | Bin BUT1/DEV1.1/hello_world | Bin BUT1/{DEV1.3 => DEV1.2/TP3}/EXO3/css.svg | 0 BUT1/{DEV1.3 => DEV1.2/TP3}/EXO3/exo3.css | 0 BUT1/{DEV1.3 => DEV1.2/TP3}/EXO3/exo3.html | 0 BUT1/{DEV1.3 => DEV1.2/TP3}/EXO3/html.svg | 0 BUT1/{DEV1.3 => DEV1.2/TP3}/EXO3/js.svg | 0 BUT1/{DEV1.3 => DEV1.2/TP3}/exo1.css | 0 BUT1/{DEV1.3 => DEV1.2/TP3}/exo1.html | 0 BUT1/{DEV1.3 => DEV1.2/TP3}/exo2.css | 0 BUT1/{DEV1.3 => DEV1.2/TP3}/exo2.html | 0 BUT1/{DEV2.2 => DEV2.1}/.DS_Store | Bin BUT1/{DEV2.2 => DEV2.1}/TEMPLATE.JAVA | 0 .../TP1-Introduction/EXO 2/Exo2.class | Bin .../TP1-Introduction/EXO 2/Exo2.java | 0 .../TP1-Introduction/EXO 3/exo3.class | Bin .../TP1-Introduction/EXO 3/exo3.java | 0 .../TP1-Introduction/EXO 4/exo4.class | Bin .../TP1-Introduction/EXO 4/exo4.java | 0 .../TP1-Introduction/EXO 5/exo5.class | Bin .../TP1-Introduction/EXO 5/exo5.java | 0 .../TP2-ComposantsGraphique/.DS_Store | Bin .../TP2-ComposantsGraphique/EXO1/exo1.class | Bin .../TP2-ComposantsGraphique/EXO1/exo1.java | 0 .../TP2-ComposantsGraphique/EXO2/exo2.class | Bin .../TP2-ComposantsGraphique/EXO2/exo2.java | 0 .../TP2-ComposantsGraphique/EXO3/exo3.class | Bin .../TP2-ComposantsGraphique/EXO3/exo3.java | 0 .../TP2-ComposantsGraphique/EXO4/exo4.class | Bin .../TP2-ComposantsGraphique/EXO4/exo4.java | 0 .../TP2-ComposantsGraphique/EXO5/exo5.class | Bin .../TP2-ComposantsGraphique/EXO5/exo5.java | 0 .../TP3-MiseEnPage/EXO1/exo1.class | Bin .../TP3-MiseEnPage/EXO1/exo1.java | 0 .../TP3-MiseEnPage/EXO2/exo2.class | Bin .../TP3-MiseEnPage/EXO2/exo2.java | 0 .../TP3-MiseEnPage/EXO3/exo3.class | Bin .../TP3-MiseEnPage/EXO3/exo3.java | 0 .../TP3-MiseEnPage/EXO4/exo4.class | Bin .../TP3-MiseEnPage/EXO4/exo4.java | 0 .../TP4-ClassesEtObjets/EXO1/binaire.class | Bin .../TP4-ClassesEtObjets/EXO1/binaire.java | 0 .../TP4-ClassesEtObjets/EXO1/compteur.class | Bin .../TP4-ClassesEtObjets/EXO1/compteur.java | 0 .../EXO2 et 3/Partie1/Date.class | Bin 0 -> 850 bytes .../EXO2 et 3/Partie1/Date.java | 27 +++++ .../EXO2 et 3/Partie2/Date.class | Bin 0 -> 1753 bytes .../EXO2 et 3/Partie2/Date.java | 99 ++++++++++++++++++ .../TP1-Introduction/EXO 1 /Bonjour.java | 17 --- BUT1/DEV2.2/TP1-Introduction/EXO 1 /exo1.java | 33 ------ README.md | 4 - 71 files changed, 128 insertions(+), 296 deletions(-) delete mode 100644 .gitignore mode change 100755 => 100644 BUT1/DEV1.1/CM2 2022/1/repetition mode change 100755 => 100644 BUT1/DEV1.1/CM2_2/CM2/carre delete mode 100644 BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/.vscode/c_cpp_properties.json delete mode 100644 BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/.vscode/launch.json delete mode 100644 BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/.vscode/settings.json delete mode 100644 BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/Makefile delete mode 100644 BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/main.c delete mode 100644 BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/repetition.c delete mode 100644 BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/repetition.h delete mode 100755 BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/repetition_ou_pas delete mode 100644 BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO2/exo2.c delete mode 100644 BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO2/image delete mode 100644 BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO2/image(2) delete mode 100644 BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO3/exo3.c delete mode 100644 BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /Lenny/main.c delete mode 100644 BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /Lenny/nom1.c mode change 100755 => 100644 BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET2/EXO1/valeurs_nulles mode change 100755 => 100644 BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET2/EXO1/valeurs_nulles_ou_pas mode change 100755 => 100644 BUT1/DEV1.1/Organisation_code/exo1/exo1 mode change 100755 => 100644 BUT1/DEV1.1/hello_world rename BUT1/{DEV1.3 => DEV1.2/TP3}/EXO3/css.svg (100%) rename BUT1/{DEV1.3 => DEV1.2/TP3}/EXO3/exo3.css (100%) rename BUT1/{DEV1.3 => DEV1.2/TP3}/EXO3/exo3.html (100%) rename BUT1/{DEV1.3 => DEV1.2/TP3}/EXO3/html.svg (100%) rename BUT1/{DEV1.3 => DEV1.2/TP3}/EXO3/js.svg (100%) rename BUT1/{DEV1.3 => DEV1.2/TP3}/exo1.css (100%) rename BUT1/{DEV1.3 => DEV1.2/TP3}/exo1.html (100%) rename BUT1/{DEV1.3 => DEV1.2/TP3}/exo2.css (100%) rename BUT1/{DEV1.3 => DEV1.2/TP3}/exo2.html (100%) rename BUT1/{DEV2.2 => DEV2.1}/.DS_Store (100%) rename BUT1/{DEV2.2 => DEV2.1}/TEMPLATE.JAVA (100%) rename BUT1/{DEV2.2 => DEV2.1}/TP1-Introduction/EXO 2/Exo2.class (100%) rename BUT1/{DEV2.2 => DEV2.1}/TP1-Introduction/EXO 2/Exo2.java (100%) rename BUT1/{DEV2.2 => DEV2.1}/TP1-Introduction/EXO 3/exo3.class (100%) rename BUT1/{DEV2.2 => DEV2.1}/TP1-Introduction/EXO 3/exo3.java (100%) rename BUT1/{DEV2.2 => DEV2.1}/TP1-Introduction/EXO 4/exo4.class (100%) rename BUT1/{DEV2.2 => DEV2.1}/TP1-Introduction/EXO 4/exo4.java (100%) rename BUT1/{DEV2.2 => DEV2.1}/TP1-Introduction/EXO 5/exo5.class (100%) rename BUT1/{DEV2.2 => DEV2.1}/TP1-Introduction/EXO 5/exo5.java (100%) rename BUT1/{DEV2.2 => DEV2.1}/TP2-ComposantsGraphique/.DS_Store (100%) rename BUT1/{DEV2.2 => DEV2.1}/TP2-ComposantsGraphique/EXO1/exo1.class (100%) rename BUT1/{DEV2.2 => DEV2.1}/TP2-ComposantsGraphique/EXO1/exo1.java (100%) rename BUT1/{DEV2.2 => DEV2.1}/TP2-ComposantsGraphique/EXO2/exo2.class (100%) rename BUT1/{DEV2.2 => DEV2.1}/TP2-ComposantsGraphique/EXO2/exo2.java (100%) rename BUT1/{DEV2.2 => DEV2.1}/TP2-ComposantsGraphique/EXO3/exo3.class (100%) rename BUT1/{DEV2.2 => DEV2.1}/TP2-ComposantsGraphique/EXO3/exo3.java (100%) rename BUT1/{DEV2.2 => DEV2.1}/TP2-ComposantsGraphique/EXO4/exo4.class (100%) rename BUT1/{DEV2.2 => DEV2.1}/TP2-ComposantsGraphique/EXO4/exo4.java (100%) rename BUT1/{DEV2.2 => DEV2.1}/TP2-ComposantsGraphique/EXO5/exo5.class (100%) rename BUT1/{DEV2.2 => DEV2.1}/TP2-ComposantsGraphique/EXO5/exo5.java (100%) rename BUT1/{DEV2.2 => DEV2.1}/TP3-MiseEnPage/EXO1/exo1.class (100%) rename BUT1/{DEV2.2 => DEV2.1}/TP3-MiseEnPage/EXO1/exo1.java (100%) rename BUT1/{DEV2.2 => DEV2.1}/TP3-MiseEnPage/EXO2/exo2.class (100%) rename BUT1/{DEV2.2 => DEV2.1}/TP3-MiseEnPage/EXO2/exo2.java (100%) rename BUT1/{DEV2.2 => DEV2.1}/TP3-MiseEnPage/EXO3/exo3.class (100%) rename BUT1/{DEV2.2 => DEV2.1}/TP3-MiseEnPage/EXO3/exo3.java (100%) rename BUT1/{DEV2.2 => DEV2.1}/TP3-MiseEnPage/EXO4/exo4.class (100%) rename BUT1/{DEV2.2 => DEV2.1}/TP3-MiseEnPage/EXO4/exo4.java (100%) rename BUT1/{DEV2.2 => DEV2.1}/TP4-ClassesEtObjets/EXO1/binaire.class (100%) rename BUT1/{DEV2.2 => DEV2.1}/TP4-ClassesEtObjets/EXO1/binaire.java (100%) rename BUT1/{DEV2.2 => DEV2.1}/TP4-ClassesEtObjets/EXO1/compteur.class (100%) rename BUT1/{DEV2.2 => DEV2.1}/TP4-ClassesEtObjets/EXO1/compteur.java (100%) create mode 100644 BUT1/DEV2.1/TP4-ClassesEtObjets/EXO2 et 3/Partie1/Date.class create mode 100644 BUT1/DEV2.1/TP4-ClassesEtObjets/EXO2 et 3/Partie1/Date.java create mode 100644 BUT1/DEV2.1/TP4-ClassesEtObjets/EXO2 et 3/Partie2/Date.class create mode 100644 BUT1/DEV2.1/TP4-ClassesEtObjets/EXO2 et 3/Partie2/Date.java delete mode 100644 BUT1/DEV2.2/TP1-Introduction/EXO 1 /Bonjour.java delete mode 100644 BUT1/DEV2.2/TP1-Introduction/EXO 1 /exo1.java delete mode 100644 README.md diff --git a/.gitignore b/.gitignore deleted file mode 100644 index cd531cf..0000000 --- a/.gitignore +++ /dev/null @@ -1,54 +0,0 @@ -# ---> C -# Prerequisites -*.d - -# Object files -*.o -*.ko -*.obj -*.elf - -# Linker output -*.ilk -*.map -*.exp - -# Precompiled Headers -*.gch -*.pch - -# Libraries -*.lib -*.a -*.la -*.lo - -# Shared objects (inc. Windows DLLs) -*.dll -*.so -*.so.* -*.dylib - -# Executables -*.exe -*.out -*.app -*.i*86 -*.x86_64 -*.hex - -# Debug files -*.dSYM/ -*.su -*.idb -*.pdb - -# Kernel Module Compile Results -*.mod* -*.cmd -.tmp_versions/ -modules.order -Module.symvers -Mkfile.old -dkms.conf - diff --git a/BUT1/CONTROLE/controle.md b/BUT1/CONTROLE/controle.md index 81a4221..27c825a 100644 --- a/BUT1/CONTROLE/controle.md +++ b/BUT1/CONTROLE/controle.md @@ -1,5 +1,5 @@ Contrôle n°1 : 17/20 -Contrôle n°2 : 15.25/20 +Contrôle n°2 : 15.25/20 ! plusieurs programmes qui ne fonctionne pas ! -Contrôle n°3 : 18.25/20 \ No newline at end of file +Contrôle n°3 : 18.25/20 ! plusieurs programmes qui ne fonctionne pas ! -> EXO 1 = remplacer ... == 3 par ... == '3' \ No newline at end of file diff --git a/BUT1/DEV1.1/CM2 2022/1/repetition b/BUT1/DEV1.1/CM2 2022/1/repetition old mode 100755 new mode 100644 diff --git a/BUT1/DEV1.1/CM2_2/CM2/carre b/BUT1/DEV1.1/CM2_2/CM2/carre old mode 100755 new mode 100644 diff --git a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/.vscode/c_cpp_properties.json b/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/.vscode/c_cpp_properties.json deleted file mode 100644 index c2098a2..0000000 --- a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/.vscode/c_cpp_properties.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "configurations": [ - { - "name": "linux-gcc-x64", - "includePath": [ - "${workspaceFolder}/**" - ], - "compilerPath": "/usr/bin/gcc", - "cStandard": "${default}", - "cppStandard": "${default}", - "intelliSenseMode": "linux-gcc-x64", - "compilerArgs": [ - "" - ] - } - ], - "version": 4 -} \ No newline at end of file diff --git a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/.vscode/launch.json b/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/.vscode/launch.json deleted file mode 100644 index b271c7a..0000000 --- a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/.vscode/launch.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "name": "C/C++ Runner: Debug Session", - "type": "cppdbg", - "request": "launch", - "args": [], - "stopAtEntry": false, - "externalConsole": false, - "cwd": "/export/home/an23/stiti/Desktop/EntrainementDS2/SUJET1 /EXO 1", - "program": "/export/home/an23/stiti/Desktop/EntrainementDS2/SUJET1 /EXO 1/build/Debug/outDebug", - "MIMode": "gdb", - "miDebuggerPath": "gdb", - "setupCommands": [ - { - "description": "Enable pretty-printing for gdb", - "text": "-enable-pretty-printing", - "ignoreFailures": true - } - ] - } - ] -} \ No newline at end of file diff --git a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/.vscode/settings.json b/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/.vscode/settings.json deleted file mode 100644 index bfd7745..0000000 --- a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/.vscode/settings.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "C_Cpp_Runner.cCompilerPath": "gcc", - "C_Cpp_Runner.cppCompilerPath": "g++", - "C_Cpp_Runner.debuggerPath": "gdb", - "C_Cpp_Runner.cStandard": "", - "C_Cpp_Runner.cppStandard": "", - "C_Cpp_Runner.msvcBatchPath": "", - "C_Cpp_Runner.useMsvc": false, - "C_Cpp_Runner.warnings": [ - "-Wall", - "-Wextra", - "-Wpedantic", - "-Wshadow", - "-Wformat=2", - "-Wconversion", - "-Wnull-dereference", - "-Wsign-conversion" - ], - "C_Cpp_Runner.enableWarnings": true, - "C_Cpp_Runner.warningsAsError": false, - "C_Cpp_Runner.compilerArgs": [], - "C_Cpp_Runner.linkerArgs": [], - "C_Cpp_Runner.includePaths": [], - "C_Cpp_Runner.includeSearch": [ - "*", - "**/*" - ], - "C_Cpp_Runner.excludeSearch": [ - "**/build", - "**/build/**", - "**/.*", - "**/.*/**", - "**/.vscode", - "**/.vscode/**" - ], - "C_Cpp_Runner.useAddressSanitizer": false -} \ No newline at end of file diff --git a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/Makefile b/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/Makefile deleted file mode 100644 index e202ac3..0000000 --- a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -# BUT PRINCIPAL -repetition_ou_pas : main.o repetition.o - gcc -ansi -pedantic -o repetition_ou_pas repetition.o main.o - -repetition.o : repetition.c - gcc -ansi -pedantic -c repetition.c - -main.o : main.c repetition.h - gcc -ansi -pedantic -c main.c - -clean : - rm -f main.o repetition.o - -.PHONY : clean \ No newline at end of file diff --git a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/main.c b/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/main.c deleted file mode 100644 index 4faca23..0000000 --- a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO 1/main.c +++ /dev/null @@ -1,25 +0,0 @@ -#include -#include -#include "../EXO 1/repetition.h" - - -int main(int argc,char* argv[]){ /* Ou "char** argv" */ - int i; - long* tab; - tab = (long*) malloc(argc*sizeof(long)); - /* Création d'un tableau de argc - 1 élément (Autrement dit, création d'un tableau du nombre d'éléments donner en argument au programme sans compter le a.out)*/ - for(i=1;i -#include - -int repetition(long tab[], int taille){ - int i; - for(i=0;i6~4P}8iyvfW5v`>N<8XI39To7#W*Bx){nKvRbF+RmP&-l+B=R%TJJi$ zv#nF5CBhVCwX#J1(1I#KTO`^aNL33`2ncQB(lixFPLYs*1Yx37S}OrkQ7RWgmUHes zXFQ&+Bj5)T(i~~#yXW!Ud*{sT?46ynUyttT3x`62r9wO^P@AYxmIyiC+)fREi0BaO zV82;>LEH)Y9nz-!5e48?G8bNsm1M5~L|#2M%HX}qEEsu)h{#(>=5RtFjDn5>d8^Pt zx*vZ-^JHYdJD!GQ5KZn~tib>fMlTPiGTSKKVzzTR9-;BZ2$_c}^5%&*PdpcCym>;- zC*}mV4$7w=Bj7`c$h{DL-X!t-*h}$@I0nkW51sgbGu{E>MKsxs@Z%%OEEsvb$AL$u zmLhHse3}Poyp_&F6Xlw`{^ay`AXOEjk8IhE_8Me9P6y2Q6aE|@S+5*(biZJG z4cWIul%MUa7j`Q0Ix-s z%7|*A-FuzacbzDj= z6r}zZ>bQhlcoTFSulY{{xl3O&a#xJ0t2Yh|MVkxF7mex8Zs?>`_b`NiJgQeWd=n@z zq3O;XSd8ga-$2;0=+wbftFR4IT~nH`Za9f?GlUTTl#Jg#h_LmRk-K4>`}1z&++u|h zde^vg%h>=O{9acbRF>vPs~dWk_&C3loprz!+15kGROeZU6h`htXPuGn`~;Lz-RrO~ zj=;gZyXrbLLx*RU<~uXG)W&>ae+x$;_7L=8NAqPVJdnvl#gDWDu#AMZ=QJj44#9-GdRvc zIHOx~&s{ch+1Y&bGK_I|4Ajm+Ffgl6^4B&gGgq6{rjwP&YI-_M$Nk@y@qoXr# zq^+c5Wj^b*YQt1d_(+zlH1Kj#isdNhPG~nxiDENL6 zCG_l|2u;?6HmzM<`E7U>MLWLh$37myfZo;eRoDa2Y=dnQ><7?ZRnu2h|5){1&s3fi zyEpFqV(SC)H6U`o3fp&KZ29X%S5?io!aeKm43EGFLTKPS0oxzJe;rV;KRQ(rz9K`= z8c2|VAOk@Lf(!&12r>|4Ajm+Ffgl4x2L5j{z;%FJ_lK|fP*U4-?7 zb%YE=6Gf^k+zEi}9 zH=I)EJj3Iq)YIhulysgq4f8(-t{?Xg+)f3jeS}XCjuLV_*NgV|^n6*{0@cV{wdPj6 zS#Q=_np#?$+FEvq6_^9OfSFK>jxN`A$orFZ4@E_-9B#8BHow-zD z*9==o-0faRZ10Cgx%%XT<`({W4$;#5YCA zK=2x1ZMfR~e6sfqw6o&DUqBoC@sE2E?3yQzn{&`8*UvSuuMgJ?KJOgAh<3brXv#t# zYq2_1zMqX?uMzi%j);oq{ds6$9{7JI@;4u_HBh`i4-d=!tHdSBoBRz2;+w#Z^Yq8> z0=ou&zdQl<`}{`GkAb~540lK0buZG^gyqP*83on7vQ!>)Jce14ZBPNid^^ z**Dm=H)N{p;zAiIKn0xnqp=%Kf0= zcW9W59mHphkez|QUs-R5hL=A{d`A4e*DHK~VcP&Sy!@Am&!}-Ap`ZUG*gt{qWS&2- zQyBU9d7a{)e+>AzMqxg$V;FDHxHw159rJlTVS^2)%zR!KF}?~uulVzS44k;;U_P%i z7h{t%q8w_o7yZ9p?pTEBt_i|#WALetn zKlbqp^ySOQ>v4|vU%zh?-yKGyNWw=+W$^QV4h}qi=0`LY$@qv;-MycW>j*D@LQ|oP zKTxW>=kv#g-$Db|cJ#4zpELOXdH#6T8UFy>Y7d{EL*^R62*PnnThiH%>l(avczj+j zy8pMtg9E|qABA~*9zO;fhA^N1KULU<(L!ud;O?2v_$he2e148862HS`ss{5I!$9`( zwTOz-niTRpm9{j0R|hio#q;NNQxoxd9FE7ayt0nQr*PNBe7wJVh526OYtI`uMjf6Z rC*Ftg9PoVj{<#KhJa;c&YgO7aJP -#include - -int main(void){ - FILE* fichier; - char couleur; - int i,a=5; - fichier = fopen("image","r"); - if(fichier==NULL){ - fputs("Erreur d'ouverture du fichier",stderr); - return EXIT_FAILURE; - }else{ - while(feof(fichier)!=1){ - a = fread(&couleur,1,1,fichier); - if(couleur == 0){ - printf("\n"); - }else{ - printf("\33[48;5;%hhum \33[m",couleur); - } - } - - } - - fclose(fichier); - return EXIT_SUCCESS; -} diff --git a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO2/image b/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO2/image deleted file mode 100644 index d2ac982ba70e76f70de813c97693643dbf850893..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1066 zcmb7@OAdoD3`BE-dYffW(mV7JoU}_86%uPCPSTmNO+pqGj8H!CGPV;^>ot{YSgkj~ zPsm2KcqJM3wvDob>_KvCFU$|p!LJ0+v3XtbKt1S8fC)HHvN;Z5B4%0y(3~v-cgb3Y zHccSu$Pp_l&YVExhtDE64I0Sp+xN30NC*o$M=ir!hW2s=5TZQv8;XU8<9yQ(S~~cIBDD60jKW}bf@DGwT1795(qpqMa!d+6k1%TiNGm=)_@YpC9=7iz z6VJ%Ch;dG2{AkQFq}^#CzqrNN@?22095G-z-st@>?d}YGh{wMYqc**JxfJbxbN#yh E0OC4sh5!Hn diff --git a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO2/image(2) b/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO2/image(2) deleted file mode 100644 index d2ac982ba70e76f70de813c97693643dbf850893..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1066 zcmb7@OAdoD3`BE-dYffW(mV7JoU}_86%uPCPSTmNO+pqGj8H!CGPV;^>ot{YSgkj~ zPsm2KcqJM3wvDob>_KvCFU$|p!LJ0+v3XtbKt1S8fC)HHvN;Z5B4%0y(3~v-cgb3Y zHccSu$Pp_l&YVExhtDE64I0Sp+xN30NC*o$M=ir!hW2s=5TZQv8;XU8<9yQ(S~~cIBDD60jKW}bf@DGwT1795(qpqMa!d+6k1%TiNGm=)_@YpC9=7iz z6VJ%Ch;dG2{AkQFq}^#CzqrNN@?22095G-z-st@>?d}YGh{wMYqc**JxfJbxbN#yh E0OC4sh5!Hn diff --git a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO3/exo3.c b/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO3/exo3.c deleted file mode 100644 index ca40af6..0000000 --- a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /EXO3/exo3.c +++ /dev/null @@ -1,23 +0,0 @@ -#include -#include -#include -#include - -int main(void){ - int i; - - struct timeval tv1; - struct timeval tv2; - - gettimeofday(&tv1,NULL); - - for(i=0;i<1000000;i++){ - sqrt(2); - } - - gettimeofday(&tv2,NULL); - - printf("%dμs",tv2.tv_usec-tv1.tv_usec); - - return EXIT_SUCCESS; -} \ No newline at end of file diff --git a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /Lenny/main.c b/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /Lenny/main.c deleted file mode 100644 index e69de29..0000000 diff --git a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /Lenny/nom1.c b/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET1 /Lenny/nom1.c deleted file mode 100644 index e69de29..0000000 diff --git a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET2/EXO1/valeurs_nulles b/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET2/EXO1/valeurs_nulles old mode 100755 new mode 100644 diff --git a/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET2/EXO1/valeurs_nulles_ou_pas b/BUT1/DEV1.1/CM2_2/EntrainementDS2/SUJET2/EXO1/valeurs_nulles_ou_pas old mode 100755 new mode 100644 diff --git a/BUT1/DEV1.1/Organisation_code/exo1/exo1 b/BUT1/DEV1.1/Organisation_code/exo1/exo1 old mode 100755 new mode 100644 diff --git a/BUT1/DEV1.1/hello_world b/BUT1/DEV1.1/hello_world old mode 100755 new mode 100644 diff --git a/BUT1/DEV1.3/EXO3/css.svg b/BUT1/DEV1.2/TP3/EXO3/css.svg similarity index 100% rename from BUT1/DEV1.3/EXO3/css.svg rename to BUT1/DEV1.2/TP3/EXO3/css.svg diff --git a/BUT1/DEV1.3/EXO3/exo3.css b/BUT1/DEV1.2/TP3/EXO3/exo3.css similarity index 100% rename from BUT1/DEV1.3/EXO3/exo3.css rename to BUT1/DEV1.2/TP3/EXO3/exo3.css diff --git a/BUT1/DEV1.3/EXO3/exo3.html b/BUT1/DEV1.2/TP3/EXO3/exo3.html similarity index 100% rename from BUT1/DEV1.3/EXO3/exo3.html rename to BUT1/DEV1.2/TP3/EXO3/exo3.html diff --git a/BUT1/DEV1.3/EXO3/html.svg b/BUT1/DEV1.2/TP3/EXO3/html.svg similarity index 100% rename from BUT1/DEV1.3/EXO3/html.svg rename to BUT1/DEV1.2/TP3/EXO3/html.svg diff --git a/BUT1/DEV1.3/EXO3/js.svg b/BUT1/DEV1.2/TP3/EXO3/js.svg similarity index 100% rename from BUT1/DEV1.3/EXO3/js.svg rename to BUT1/DEV1.2/TP3/EXO3/js.svg diff --git a/BUT1/DEV1.3/exo1.css b/BUT1/DEV1.2/TP3/exo1.css similarity index 100% rename from BUT1/DEV1.3/exo1.css rename to BUT1/DEV1.2/TP3/exo1.css diff --git a/BUT1/DEV1.3/exo1.html b/BUT1/DEV1.2/TP3/exo1.html similarity index 100% rename from BUT1/DEV1.3/exo1.html rename to BUT1/DEV1.2/TP3/exo1.html diff --git a/BUT1/DEV1.3/exo2.css b/BUT1/DEV1.2/TP3/exo2.css similarity index 100% rename from BUT1/DEV1.3/exo2.css rename to BUT1/DEV1.2/TP3/exo2.css diff --git a/BUT1/DEV1.3/exo2.html b/BUT1/DEV1.2/TP3/exo2.html similarity index 100% rename from BUT1/DEV1.3/exo2.html rename to BUT1/DEV1.2/TP3/exo2.html diff --git a/BUT1/DEV2.2/.DS_Store b/BUT1/DEV2.1/.DS_Store similarity index 100% rename from BUT1/DEV2.2/.DS_Store rename to BUT1/DEV2.1/.DS_Store diff --git a/BUT1/DEV2.2/TEMPLATE.JAVA b/BUT1/DEV2.1/TEMPLATE.JAVA similarity index 100% rename from BUT1/DEV2.2/TEMPLATE.JAVA rename to BUT1/DEV2.1/TEMPLATE.JAVA diff --git a/BUT1/DEV2.2/TP1-Introduction/EXO 2/Exo2.class b/BUT1/DEV2.1/TP1-Introduction/EXO 2/Exo2.class similarity index 100% rename from BUT1/DEV2.2/TP1-Introduction/EXO 2/Exo2.class rename to BUT1/DEV2.1/TP1-Introduction/EXO 2/Exo2.class diff --git a/BUT1/DEV2.2/TP1-Introduction/EXO 2/Exo2.java b/BUT1/DEV2.1/TP1-Introduction/EXO 2/Exo2.java similarity index 100% rename from BUT1/DEV2.2/TP1-Introduction/EXO 2/Exo2.java rename to BUT1/DEV2.1/TP1-Introduction/EXO 2/Exo2.java diff --git a/BUT1/DEV2.2/TP1-Introduction/EXO 3/exo3.class b/BUT1/DEV2.1/TP1-Introduction/EXO 3/exo3.class similarity index 100% rename from BUT1/DEV2.2/TP1-Introduction/EXO 3/exo3.class rename to BUT1/DEV2.1/TP1-Introduction/EXO 3/exo3.class diff --git a/BUT1/DEV2.2/TP1-Introduction/EXO 3/exo3.java b/BUT1/DEV2.1/TP1-Introduction/EXO 3/exo3.java similarity index 100% rename from BUT1/DEV2.2/TP1-Introduction/EXO 3/exo3.java rename to BUT1/DEV2.1/TP1-Introduction/EXO 3/exo3.java diff --git a/BUT1/DEV2.2/TP1-Introduction/EXO 4/exo4.class b/BUT1/DEV2.1/TP1-Introduction/EXO 4/exo4.class similarity index 100% rename from BUT1/DEV2.2/TP1-Introduction/EXO 4/exo4.class rename to BUT1/DEV2.1/TP1-Introduction/EXO 4/exo4.class diff --git a/BUT1/DEV2.2/TP1-Introduction/EXO 4/exo4.java b/BUT1/DEV2.1/TP1-Introduction/EXO 4/exo4.java similarity index 100% rename from BUT1/DEV2.2/TP1-Introduction/EXO 4/exo4.java rename to BUT1/DEV2.1/TP1-Introduction/EXO 4/exo4.java diff --git a/BUT1/DEV2.2/TP1-Introduction/EXO 5/exo5.class b/BUT1/DEV2.1/TP1-Introduction/EXO 5/exo5.class similarity index 100% rename from BUT1/DEV2.2/TP1-Introduction/EXO 5/exo5.class rename to BUT1/DEV2.1/TP1-Introduction/EXO 5/exo5.class diff --git a/BUT1/DEV2.2/TP1-Introduction/EXO 5/exo5.java b/BUT1/DEV2.1/TP1-Introduction/EXO 5/exo5.java similarity index 100% rename from BUT1/DEV2.2/TP1-Introduction/EXO 5/exo5.java rename to BUT1/DEV2.1/TP1-Introduction/EXO 5/exo5.java diff --git a/BUT1/DEV2.2/TP2-ComposantsGraphique/.DS_Store b/BUT1/DEV2.1/TP2-ComposantsGraphique/.DS_Store similarity index 100% rename from BUT1/DEV2.2/TP2-ComposantsGraphique/.DS_Store rename to BUT1/DEV2.1/TP2-ComposantsGraphique/.DS_Store diff --git a/BUT1/DEV2.2/TP2-ComposantsGraphique/EXO1/exo1.class b/BUT1/DEV2.1/TP2-ComposantsGraphique/EXO1/exo1.class similarity index 100% rename from BUT1/DEV2.2/TP2-ComposantsGraphique/EXO1/exo1.class rename to BUT1/DEV2.1/TP2-ComposantsGraphique/EXO1/exo1.class diff --git a/BUT1/DEV2.2/TP2-ComposantsGraphique/EXO1/exo1.java b/BUT1/DEV2.1/TP2-ComposantsGraphique/EXO1/exo1.java similarity index 100% rename from BUT1/DEV2.2/TP2-ComposantsGraphique/EXO1/exo1.java rename to BUT1/DEV2.1/TP2-ComposantsGraphique/EXO1/exo1.java diff --git a/BUT1/DEV2.2/TP2-ComposantsGraphique/EXO2/exo2.class b/BUT1/DEV2.1/TP2-ComposantsGraphique/EXO2/exo2.class similarity index 100% rename from BUT1/DEV2.2/TP2-ComposantsGraphique/EXO2/exo2.class rename to BUT1/DEV2.1/TP2-ComposantsGraphique/EXO2/exo2.class diff --git a/BUT1/DEV2.2/TP2-ComposantsGraphique/EXO2/exo2.java b/BUT1/DEV2.1/TP2-ComposantsGraphique/EXO2/exo2.java similarity index 100% rename from BUT1/DEV2.2/TP2-ComposantsGraphique/EXO2/exo2.java rename to BUT1/DEV2.1/TP2-ComposantsGraphique/EXO2/exo2.java diff --git a/BUT1/DEV2.2/TP2-ComposantsGraphique/EXO3/exo3.class b/BUT1/DEV2.1/TP2-ComposantsGraphique/EXO3/exo3.class similarity index 100% rename from BUT1/DEV2.2/TP2-ComposantsGraphique/EXO3/exo3.class rename to BUT1/DEV2.1/TP2-ComposantsGraphique/EXO3/exo3.class diff --git a/BUT1/DEV2.2/TP2-ComposantsGraphique/EXO3/exo3.java b/BUT1/DEV2.1/TP2-ComposantsGraphique/EXO3/exo3.java similarity index 100% rename from BUT1/DEV2.2/TP2-ComposantsGraphique/EXO3/exo3.java rename to BUT1/DEV2.1/TP2-ComposantsGraphique/EXO3/exo3.java diff --git a/BUT1/DEV2.2/TP2-ComposantsGraphique/EXO4/exo4.class b/BUT1/DEV2.1/TP2-ComposantsGraphique/EXO4/exo4.class similarity index 100% rename from BUT1/DEV2.2/TP2-ComposantsGraphique/EXO4/exo4.class rename to BUT1/DEV2.1/TP2-ComposantsGraphique/EXO4/exo4.class diff --git a/BUT1/DEV2.2/TP2-ComposantsGraphique/EXO4/exo4.java b/BUT1/DEV2.1/TP2-ComposantsGraphique/EXO4/exo4.java similarity index 100% rename from BUT1/DEV2.2/TP2-ComposantsGraphique/EXO4/exo4.java rename to BUT1/DEV2.1/TP2-ComposantsGraphique/EXO4/exo4.java diff --git a/BUT1/DEV2.2/TP2-ComposantsGraphique/EXO5/exo5.class b/BUT1/DEV2.1/TP2-ComposantsGraphique/EXO5/exo5.class similarity index 100% rename from BUT1/DEV2.2/TP2-ComposantsGraphique/EXO5/exo5.class rename to BUT1/DEV2.1/TP2-ComposantsGraphique/EXO5/exo5.class diff --git a/BUT1/DEV2.2/TP2-ComposantsGraphique/EXO5/exo5.java b/BUT1/DEV2.1/TP2-ComposantsGraphique/EXO5/exo5.java similarity index 100% rename from BUT1/DEV2.2/TP2-ComposantsGraphique/EXO5/exo5.java rename to BUT1/DEV2.1/TP2-ComposantsGraphique/EXO5/exo5.java diff --git a/BUT1/DEV2.2/TP3-MiseEnPage/EXO1/exo1.class b/BUT1/DEV2.1/TP3-MiseEnPage/EXO1/exo1.class similarity index 100% rename from BUT1/DEV2.2/TP3-MiseEnPage/EXO1/exo1.class rename to BUT1/DEV2.1/TP3-MiseEnPage/EXO1/exo1.class diff --git a/BUT1/DEV2.2/TP3-MiseEnPage/EXO1/exo1.java b/BUT1/DEV2.1/TP3-MiseEnPage/EXO1/exo1.java similarity index 100% rename from BUT1/DEV2.2/TP3-MiseEnPage/EXO1/exo1.java rename to BUT1/DEV2.1/TP3-MiseEnPage/EXO1/exo1.java diff --git a/BUT1/DEV2.2/TP3-MiseEnPage/EXO2/exo2.class b/BUT1/DEV2.1/TP3-MiseEnPage/EXO2/exo2.class similarity index 100% rename from BUT1/DEV2.2/TP3-MiseEnPage/EXO2/exo2.class rename to BUT1/DEV2.1/TP3-MiseEnPage/EXO2/exo2.class diff --git a/BUT1/DEV2.2/TP3-MiseEnPage/EXO2/exo2.java b/BUT1/DEV2.1/TP3-MiseEnPage/EXO2/exo2.java similarity index 100% rename from BUT1/DEV2.2/TP3-MiseEnPage/EXO2/exo2.java rename to BUT1/DEV2.1/TP3-MiseEnPage/EXO2/exo2.java diff --git a/BUT1/DEV2.2/TP3-MiseEnPage/EXO3/exo3.class b/BUT1/DEV2.1/TP3-MiseEnPage/EXO3/exo3.class similarity index 100% rename from BUT1/DEV2.2/TP3-MiseEnPage/EXO3/exo3.class rename to BUT1/DEV2.1/TP3-MiseEnPage/EXO3/exo3.class diff --git a/BUT1/DEV2.2/TP3-MiseEnPage/EXO3/exo3.java b/BUT1/DEV2.1/TP3-MiseEnPage/EXO3/exo3.java similarity index 100% rename from BUT1/DEV2.2/TP3-MiseEnPage/EXO3/exo3.java rename to BUT1/DEV2.1/TP3-MiseEnPage/EXO3/exo3.java diff --git a/BUT1/DEV2.2/TP3-MiseEnPage/EXO4/exo4.class b/BUT1/DEV2.1/TP3-MiseEnPage/EXO4/exo4.class similarity index 100% rename from BUT1/DEV2.2/TP3-MiseEnPage/EXO4/exo4.class rename to BUT1/DEV2.1/TP3-MiseEnPage/EXO4/exo4.class diff --git a/BUT1/DEV2.2/TP3-MiseEnPage/EXO4/exo4.java b/BUT1/DEV2.1/TP3-MiseEnPage/EXO4/exo4.java similarity index 100% rename from BUT1/DEV2.2/TP3-MiseEnPage/EXO4/exo4.java rename to BUT1/DEV2.1/TP3-MiseEnPage/EXO4/exo4.java diff --git a/BUT1/DEV2.2/TP4-ClassesEtObjets/EXO1/binaire.class b/BUT1/DEV2.1/TP4-ClassesEtObjets/EXO1/binaire.class similarity index 100% rename from BUT1/DEV2.2/TP4-ClassesEtObjets/EXO1/binaire.class rename to BUT1/DEV2.1/TP4-ClassesEtObjets/EXO1/binaire.class diff --git a/BUT1/DEV2.2/TP4-ClassesEtObjets/EXO1/binaire.java b/BUT1/DEV2.1/TP4-ClassesEtObjets/EXO1/binaire.java similarity index 100% rename from BUT1/DEV2.2/TP4-ClassesEtObjets/EXO1/binaire.java rename to BUT1/DEV2.1/TP4-ClassesEtObjets/EXO1/binaire.java diff --git a/BUT1/DEV2.2/TP4-ClassesEtObjets/EXO1/compteur.class b/BUT1/DEV2.1/TP4-ClassesEtObjets/EXO1/compteur.class similarity index 100% rename from BUT1/DEV2.2/TP4-ClassesEtObjets/EXO1/compteur.class rename to BUT1/DEV2.1/TP4-ClassesEtObjets/EXO1/compteur.class diff --git a/BUT1/DEV2.2/TP4-ClassesEtObjets/EXO1/compteur.java b/BUT1/DEV2.1/TP4-ClassesEtObjets/EXO1/compteur.java similarity index 100% rename from BUT1/DEV2.2/TP4-ClassesEtObjets/EXO1/compteur.java rename to BUT1/DEV2.1/TP4-ClassesEtObjets/EXO1/compteur.java diff --git a/BUT1/DEV2.1/TP4-ClassesEtObjets/EXO2 et 3/Partie1/Date.class b/BUT1/DEV2.1/TP4-ClassesEtObjets/EXO2 et 3/Partie1/Date.class new file mode 100644 index 0000000000000000000000000000000000000000..d59816bfc2f25eded9f36800df168ab1972fbe2e GIT binary patch literal 850 zcmZuv*>2N76g}fCjvZ$$O-m_Dfq>&c+?KMb2p&L4ks=BTDvEe=+G*q{u~F(&;;#S^ zT7lpL_!7PXaV7~(P?4oO*LOMh+%xm@_tzf)w(!725~~K%xTwq}WiF?1MaP@xc_+-Ee` z@B{f`*l)|hYp>m7Bo&3tXy6AOfpd1H(e;izx90^NcM{!Jz@8rnlvkKa5lEa>S z?khOsnHR~LLa|W9f`u${7V^pzkQ1=V`)+xCb7BPYvw1u1uH1`s+_G>RH65;nb!_O^ zv~UMoI__Gyhx??XCRiw8NuV%muLqIrNNS-UdA*_BIZ%x2^9xNYxY69yzq=<7!a?7Q z1RmOFx13*mLUVf__*AKR-1mo(>{I=4NYKRzrXRX5DRsmK>GeruVa)&EFgJLoih9(1 z@jqlLyIAApC;56}(3HOPG$rx)q{`!rQ1XM9%D*Sf3!Y2PF@%#Zj-WY-5n@h3|20DV zBU7A3TS9`?KpZB&G@+Ex8D=T>6zmmiG*)dC6UpyLwqnj_#803%TXA}^v6rByDenZS z#wQrnFEFbgPRC@)9DENpIl5$NU>WD9@HK)f`0O{NTgR{(?9IHHQJnNHBgKvkR@k+| IY7H0u02D5%1poj5 literal 0 HcmV?d00001 diff --git a/BUT1/DEV2.1/TP4-ClassesEtObjets/EXO2 et 3/Partie1/Date.java b/BUT1/DEV2.1/TP4-ClassesEtObjets/EXO2 et 3/Partie1/Date.java new file mode 100644 index 0000000..e4697d4 --- /dev/null +++ b/BUT1/DEV2.1/TP4-ClassesEtObjets/EXO2 et 3/Partie1/Date.java @@ -0,0 +1,27 @@ +public class Date{ + + // Attribut + private int jour; + private int mois; + private int annee; + + // Constructeur + public Date(){ + this.jour = 18; + this.mois = 2; + this.annee = 2024; + } + + // Méthode + public String toString() { + String dateString = String.format("%d/%02d/%02d", this.annee, this.mois, this.jour); // Format ISO 8601 = AAAA/MM/JJ + System.out.println(dateString); + return dateString; + } + + + public static void main(String args[]){ + Date date = new Date(); + date.toString(); + } +} \ No newline at end of file diff --git a/BUT1/DEV2.1/TP4-ClassesEtObjets/EXO2 et 3/Partie2/Date.class b/BUT1/DEV2.1/TP4-ClassesEtObjets/EXO2 et 3/Partie2/Date.class new file mode 100644 index 0000000000000000000000000000000000000000..9f7eb4789c7dd10d269b468d01ade96a310932b1 GIT binary patch literal 1753 zcmZ`(TTf$E6#jO5+S8T;lxuOgjt){M#P6{8E3@IikS-_j(H#M z2==Z_78JDoLZzgj5_EHg%z=W(%;zmj!8@DDXUcIp;Y1=ax=FxdAWF~K|RdU-_ zX~W#kGU6*2Qsq)6zo*a{9!>6>Ps~`>%1skuO_&!mB?qvlVN7SD`zcXcYboL5Uj*s@;)yw@}KNWreBmWdR#CbrhIsBtE~< zM&7Ru%2tkf7Ahp|ayT=E*h98NnHwxK$3(nlvB)M+7{B7w%SW7P$Bh^8|C>@B-(d@N z@q9{Elx(u>zpks!r@$BDwR1Lk#eTj+zzvu54n3E&k3F)3IC`L@8)*AEo8`L3u`_ZC z73n>JE7ErYcclLW+HZ_24A6FS7s#wZUSktlV4#DKR7pdeG2OA5fpELW`zO3x?#Lg| zoT(W&e^?W0NQBTpbnb~kxlaYS$50{!5obi7f(CFZ5h2sh{@%!?Uom;;qMbNYv|$@Ja3#*L zabDtH!oStq*MEwD6ymaFTB9hASRo44gH}G;6^gw$QJa03Sz!Pf}m z8;s&RMDRVL_yObiksr*T_)UF-Y%S1VVMQs`>+$q@T$G1T%@GNI^ISJEyHQFr#{Vzy zM4#0rPvIFmpB!U>aW_Hk8pxj1K=$Mq{RFuPa@9cg#0IH)opDwMOtBHB*#vP`I?qZM znb#6CzsE2Aea!LmGmi)St>8l>@e$Urjdi4vvg`7}+iZmRV?(`39h`Rjme(#7r9|G~ zV9;pO|E0vqXcbMXzr%Qm=B-n-w6|6fWUQ@<_9{9W7CN~w*0>Oja@tizcfFgh*)QZ{ Z7V#LJ_=JLgie-F`N4y-x>yYal{SUH1X7K<3 literal 0 HcmV?d00001 diff --git a/BUT1/DEV2.1/TP4-ClassesEtObjets/EXO2 et 3/Partie2/Date.java b/BUT1/DEV2.1/TP4-ClassesEtObjets/EXO2 et 3/Partie2/Date.java new file mode 100644 index 0000000..99dc787 --- /dev/null +++ b/BUT1/DEV2.1/TP4-ClassesEtObjets/EXO2 et 3/Partie2/Date.java @@ -0,0 +1,99 @@ +public class Date{ + + // Attribut + private int jour; + private int mois; + private int annee; + + // Constructeur + public Date(int jour, int mois, int annee){ + this.jour = jour; + this.mois = mois; + this.annee = annee; + } + + // Méthode pour afficher la date + public String toString() { + return String.format("%d/%02d/%02d", this.annee, this.mois, this.jour); // Format ISO 8601 = AAAA/MM/JJ; + } + + // Méthode pour donner le lendemain d'une date + public Date lendemain() { + int jourLendemain = this.jour; + int moisLendemain = this.mois; + int anneeLendemain = this.annee; + + if(this.mois == 1 || this.mois == 3 || this.mois == 5 || this.mois == 7 || this.mois == 8 || this.mois == 10 || this.mois == 12){ + if (this.jour == 31) { + jourLendemain = 1; + if (this.mois == 12) { + moisLendemain = 1; + anneeLendemain += 1; + } else { + moisLendemain += 1; + } + } else { + jourLendemain += 1; + } + }else{ + if (this.jour == 30) { + jourLendemain = 1; + if (this.mois == 12) { + moisLendemain = 1; + anneeLendemain += 1; + } else { + moisLendemain += 1; + } + } else { + jourLendemain += 1; + } + } + + return new Date(jourLendemain, moisLendemain, anneeLendemain); + } + + public Date comparerDate(Date date1, Date date2){ + // Si l'année de la date 1 est plus grande que l'année de la date 2 + if(date1.annee > date2.annee){ + return date1; + } + + // Si l'année de la date 2 est plus grande que l'année de la date 1 + if(date1.annee < date2.annee){ + return date2; + } + + // Si l'année de la date 1 est égale à l'année de la date 2 = on ne peut pas se fier à l'année et on passe aux mois + if(date1.annee == date2.annee){ + if(date1.mois > date2.mois){ + return date1; + } + if(date1.mois < date2.mois){ + return date2; + } + if(date1.mois == date2.mois){ + if(date1.jour > date2.jour){ + return date1; + } + if(date1.jour < date2.jour){ + return date2; + } + } + } + return null; + } + + + + + public static void main(String[] args) { + Date date = new Date(31,12,2024); + Date dateLendemain = date.lendemain(); + + System.out.println("Aujourd'hui : " + date); + System.out.println("Demain : " + dateLendemain); + + System.out.println(date.comparerDate(date,dateLendemain)); + } + +} \ No newline at end of file diff --git a/BUT1/DEV2.2/TP1-Introduction/EXO 1 /Bonjour.java b/BUT1/DEV2.2/TP1-Introduction/EXO 1 /Bonjour.java deleted file mode 100644 index ab95b0b..0000000 --- a/BUT1/DEV2.2/TP1-Introduction/EXO 1 /Bonjour.java +++ /dev/null @@ -1,17 +0,0 @@ -/** -* Cette classe est une simple coquille pour recevoir la méthode principale -* -* @version 1.1 09 March 2014 -* @author Luc Hernandez -*/ -public class Bonjour { - - /** - * Affiche «Bonjour !» - * - * @param args la liste des arguments de la ligne de commande (inutilisée ici) - */ - public static void main(String[] args) { - System.out.println("Bonjour !"); - } -} \ No newline at end of file diff --git a/BUT1/DEV2.2/TP1-Introduction/EXO 1 /exo1.java b/BUT1/DEV2.2/TP1-Introduction/EXO 1 /exo1.java deleted file mode 100644 index 590fe19..0000000 --- a/BUT1/DEV2.2/TP1-Introduction/EXO 1 /exo1.java +++ /dev/null @@ -1,33 +0,0 @@ -/** -* Cette classe est une simple coquille pour recevoir la méthode principale -* -* @version 1.1 09 March 2014 -* @author Luc Hernandez -*/ -public class exo1 { - - /** - * Affiche «Bonjour !» - * - * @param args la liste des arguments de la ligne de commande (inutilisée ici) - */ - public static void main(String[] args) { - byte moncefleboss1 = 1; - short moncefleboss2 = 1; - int moncefleboss3 = 1; - long moncefleboss4 = 1; - boolean moncefleboss5 = false; - char moncefleboss6 = 'Y'; - float moncefleboss7 = -1.5f; - double moncefleboss8 = 47.0d; - - System.out.println("Valeur : " + moncefleboss1); - System.out.println("Valeur : " + moncefleboss2); - System.out.println("Valeur : " + moncefleboss3); - System.out.println("Valeur : " + moncefleboss4); - System.out.println("Valeur : " + moncefleboss5); - System.out.println("Valeur : " + moncefleboss6); - System.out.println("Valeur : " + moncefleboss7); - System.out.println("Valeur : " + moncefleboss8); - } -} \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index 8d773ca..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# DEV - -L'ensemble de mes TP de DEV depuis le début de l'année. -