diff --git a/APL1.1/CM1/Fleur.c b/APL1.1/CM1/Fleur.c index 3dc96e0..0b8bd98 100644 --- a/APL1.1/CM1/Fleur.c +++ b/APL1.1/CM1/Fleur.c @@ -7,7 +7,7 @@ int main (void) { printf (" (_(%)_)\n"); printf (" /(_)\n"); printf ("__ | \n"); - printf ("\\_\\|\n"); + printf ("\_\|\n"); printf (" |\n"); printf (" |\n"); return EXIT_SUCCESS; diff --git a/Dev1.1/Debogueur/doubleur b/APL1.1/Dev1.1/Debogueur/doubleur similarity index 100% rename from Dev1.1/Debogueur/doubleur rename to APL1.1/Dev1.1/Debogueur/doubleur diff --git a/Dev1.1/Debogueur/doubleur.c b/APL1.1/Dev1.1/Debogueur/doubleur.c similarity index 100% rename from Dev1.1/Debogueur/doubleur.c rename to APL1.1/Dev1.1/Debogueur/doubleur.c diff --git a/Dev1.1/Debogueur/envers b/APL1.1/Dev1.1/Debogueur/envers similarity index 100% rename from Dev1.1/Debogueur/envers rename to APL1.1/Dev1.1/Debogueur/envers diff --git a/Dev1.1/Debogueur/envers.c b/APL1.1/Dev1.1/Debogueur/envers.c similarity index 100% rename from Dev1.1/Debogueur/envers.c rename to APL1.1/Dev1.1/Debogueur/envers.c diff --git a/Dev1.1/Debogueur/reponses.txt b/APL1.1/Dev1.1/Debogueur/reponses.txt similarity index 100% rename from Dev1.1/Debogueur/reponses.txt rename to APL1.1/Dev1.1/Debogueur/reponses.txt diff --git a/Dev1.1/Dev0510/Affluence b/APL1.1/Dev1.1/Dev0510/Affluence similarity index 100% rename from Dev1.1/Dev0510/Affluence rename to APL1.1/Dev1.1/Dev0510/Affluence diff --git a/Dev1.1/Dev0510/Affluence.c b/APL1.1/Dev1.1/Dev0510/Affluence.c similarity index 100% rename from Dev1.1/Dev0510/Affluence.c rename to APL1.1/Dev1.1/Dev0510/Affluence.c diff --git a/Dev1.1/Dev0510/Debordement.c b/APL1.1/Dev1.1/Dev0510/Debordement.c similarity index 100% rename from Dev1.1/Dev0510/Debordement.c rename to APL1.1/Dev1.1/Dev0510/Debordement.c diff --git a/Dev1.1/Dev0510/Débordement b/APL1.1/Dev1.1/Dev0510/Débordement similarity index 100% rename from Dev1.1/Dev0510/Débordement rename to APL1.1/Dev1.1/Dev0510/Débordement diff --git a/Dev1.1/Dev0510/Monnaie b/APL1.1/Dev1.1/Dev0510/Monnaie similarity index 100% rename from Dev1.1/Dev0510/Monnaie rename to APL1.1/Dev1.1/Dev0510/Monnaie diff --git a/Dev1.1/Dev0510/Monnaie.c b/APL1.1/Dev1.1/Dev0510/Monnaie.c similarity index 100% rename from Dev1.1/Dev0510/Monnaie.c rename to APL1.1/Dev1.1/Dev0510/Monnaie.c diff --git a/Dev1.1/Dev0510/Variété b/APL1.1/Dev1.1/Dev0510/Variété similarity index 100% rename from Dev1.1/Dev0510/Variété rename to APL1.1/Dev1.1/Dev0510/Variété diff --git a/Dev1.1/Dev0510/Variété.c b/APL1.1/Dev1.1/Dev0510/Variété.c similarity index 100% rename from Dev1.1/Dev0510/Variété.c rename to APL1.1/Dev1.1/Dev0510/Variété.c diff --git a/Dev1.1/Dev1110/Distance b/APL1.1/Dev1.1/Dev1110/Distance similarity index 100% rename from Dev1.1/Dev1110/Distance rename to APL1.1/Dev1.1/Dev1110/Distance diff --git a/Dev1.1/Dev1110/Distance.c b/APL1.1/Dev1.1/Dev1110/Distance.c similarity index 100% rename from Dev1.1/Dev1110/Distance.c rename to APL1.1/Dev1.1/Dev1110/Distance.c diff --git a/Dev1.1/Dev1110/Extremités b/APL1.1/Dev1.1/Dev1110/Extremités similarity index 100% rename from Dev1.1/Dev1110/Extremités rename to APL1.1/Dev1.1/Dev1110/Extremités diff --git a/Dev1.1/Dev1110/Extrémités.c b/APL1.1/Dev1.1/Dev1110/Extrémités.c similarity index 100% rename from Dev1.1/Dev1110/Extrémités.c rename to APL1.1/Dev1.1/Dev1110/Extrémités.c diff --git a/Dev1.1/Dev1110/Poussiere b/APL1.1/Dev1.1/Dev1110/Poussiere similarity index 100% rename from Dev1.1/Dev1110/Poussiere rename to APL1.1/Dev1.1/Dev1110/Poussiere diff --git a/Dev1.1/Dev1110/Poussière.c b/APL1.1/Dev1.1/Dev1110/Poussière.c similarity index 100% rename from Dev1.1/Dev1110/Poussière.c rename to APL1.1/Dev1.1/Dev1110/Poussière.c diff --git a/Dev1.1/Dev1110/telescopage b/APL1.1/Dev1.1/Dev1110/telescopage similarity index 100% rename from Dev1.1/Dev1110/telescopage rename to APL1.1/Dev1.1/Dev1110/telescopage diff --git a/Dev1.1/Dev1110/telescopage.c b/APL1.1/Dev1.1/Dev1110/telescopage.c similarity index 100% rename from Dev1.1/Dev1110/telescopage.c rename to APL1.1/Dev1.1/Dev1110/telescopage.c diff --git a/Dev1.1/Dev1810/Horizontal b/APL1.1/Dev1.1/Dev1810/Horizontal similarity index 100% rename from Dev1.1/Dev1810/Horizontal rename to APL1.1/Dev1.1/Dev1810/Horizontal diff --git a/Dev1.1/Dev1810/Horizontal.c b/APL1.1/Dev1.1/Dev1810/Horizontal.c similarity index 100% rename from Dev1.1/Dev1810/Horizontal.c rename to APL1.1/Dev1.1/Dev1810/Horizontal.c diff --git a/Dev1.1/Dev1810/Progression.c b/APL1.1/Dev1.1/Dev1810/Progression.c similarity index 100% rename from Dev1.1/Dev1810/Progression.c rename to APL1.1/Dev1.1/Dev1810/Progression.c diff --git a/Dev1.1/Dev1810/progression b/APL1.1/Dev1.1/Dev1810/progression similarity index 100% rename from Dev1.1/Dev1810/progression rename to APL1.1/Dev1.1/Dev1810/progression diff --git a/Dev1.1/Dev1910/Triangle b/APL1.1/Dev1.1/Dev1910/Triangle similarity index 100% rename from Dev1.1/Dev1910/Triangle rename to APL1.1/Dev1.1/Dev1910/Triangle diff --git a/Dev1.1/Dev1910/Triangle.c b/APL1.1/Dev1.1/Dev1910/Triangle.c similarity index 100% rename from Dev1.1/Dev1910/Triangle.c rename to APL1.1/Dev1.1/Dev1910/Triangle.c diff --git a/Dev1.1/Dev1910/magique b/APL1.1/Dev1.1/Dev1910/magique similarity index 100% rename from Dev1.1/Dev1910/magique rename to APL1.1/Dev1.1/Dev1910/magique diff --git a/Dev1.1/Dev1910/magique.c b/APL1.1/Dev1.1/Dev1910/magique.c similarity index 100% rename from Dev1.1/Dev1910/magique.c rename to APL1.1/Dev1.1/Dev1910/magique.c diff --git a/Dev1.1/Dev2510/Lecture b/APL1.1/Dev1.1/Dev2510/Lecture similarity index 100% rename from Dev1.1/Dev2510/Lecture rename to APL1.1/Dev1.1/Dev2510/Lecture diff --git a/Dev1.1/Dev2510/Lecture.c b/APL1.1/Dev1.1/Dev2510/Lecture.c similarity index 100% rename from Dev1.1/Dev2510/Lecture.c rename to APL1.1/Dev1.1/Dev2510/Lecture.c diff --git a/Dev1.1/Dev2809/Devinette b/APL1.1/Dev1.1/Dev2809/Devinette similarity index 100% rename from Dev1.1/Dev2809/Devinette rename to APL1.1/Dev1.1/Dev2809/Devinette diff --git a/Dev1.1/Dev2809/Devinette.c b/APL1.1/Dev1.1/Dev2809/Devinette.c similarity index 100% rename from Dev1.1/Dev2809/Devinette.c rename to APL1.1/Dev1.1/Dev2809/Devinette.c diff --git a/Dev1.1/Dev2809/Figures.c b/APL1.1/Dev1.1/Dev2809/Figures.c similarity index 100% rename from Dev1.1/Dev2809/Figures.c rename to APL1.1/Dev1.1/Dev2809/Figures.c diff --git a/Dev1.1/Dev2809/Premier b/APL1.1/Dev1.1/Dev2809/Premier similarity index 100% rename from Dev1.1/Dev2809/Premier rename to APL1.1/Dev1.1/Dev2809/Premier diff --git a/Dev1.1/Dev2809/Premier.C b/APL1.1/Dev1.1/Dev2809/Premier.C similarity index 100% rename from Dev1.1/Dev2809/Premier.C rename to APL1.1/Dev1.1/Dev2809/Premier.C diff --git a/Dev1.1/Dev2809/Progression.c b/APL1.1/Dev1.1/Dev2809/Progression.c similarity index 100% rename from Dev1.1/Dev2809/Progression.c rename to APL1.1/Dev1.1/Dev2809/Progression.c diff --git a/Dev1.1/Dev2809/TableMultiplication b/APL1.1/Dev1.1/Dev2809/TableMultiplication similarity index 100% rename from Dev1.1/Dev2809/TableMultiplication rename to APL1.1/Dev1.1/Dev2809/TableMultiplication diff --git a/Dev1.1/Dev2809/TableMultiplication.c b/APL1.1/Dev1.1/Dev2809/TableMultiplication.c similarity index 100% rename from Dev1.1/Dev2809/TableMultiplication.c rename to APL1.1/Dev1.1/Dev2809/TableMultiplication.c diff --git a/Dev1.1/Dev2809/progression b/APL1.1/Dev1.1/Dev2809/progression similarity index 100% rename from Dev1.1/Dev2809/progression rename to APL1.1/Dev1.1/Dev2809/progression diff --git a/Dev1.1/Dev811/Découpage b/APL1.1/Dev1.1/Dev811/Découpage similarity index 100% rename from Dev1.1/Dev811/Découpage rename to APL1.1/Dev1.1/Dev811/Découpage diff --git a/Dev1.1/Dev811/Découpage.c b/APL1.1/Dev1.1/Dev811/Découpage.c similarity index 100% rename from Dev1.1/Dev811/Découpage.c rename to APL1.1/Dev1.1/Dev811/Découpage.c diff --git a/Dev1.1/Fonctions/decoupage.c b/APL1.1/Dev1.1/Fonctions/decoupage.c similarity index 100% rename from Dev1.1/Fonctions/decoupage.c rename to APL1.1/Dev1.1/Fonctions/decoupage.c diff --git a/Dev1.1/Fonctions/miroir.c b/APL1.1/Dev1.1/Fonctions/miroir.c similarity index 100% rename from Dev1.1/Fonctions/miroir.c rename to APL1.1/Dev1.1/Fonctions/miroir.c diff --git a/Dev1.1/Fonctions/zero.c b/APL1.1/Dev1.1/Fonctions/zero.c similarity index 100% rename from Dev1.1/Fonctions/zero.c rename to APL1.1/Dev1.1/Fonctions/zero.c diff --git a/Dev1.1/OrganisationCode/exo1.tar.gz b/APL1.1/Dev1.1/OrganisationCode/exo1.tar.gz similarity index 100% rename from Dev1.1/OrganisationCode/exo1.tar.gz rename to APL1.1/Dev1.1/OrganisationCode/exo1.tar.gz diff --git a/Dev1.1/OrganisationCode/exo1/Makefile b/APL1.1/Dev1.1/OrganisationCode/exo1/Makefile similarity index 100% rename from Dev1.1/OrganisationCode/exo1/Makefile rename to APL1.1/Dev1.1/OrganisationCode/exo1/Makefile diff --git a/Dev1.1/OrganisationCode/exo1/exo1 b/APL1.1/Dev1.1/OrganisationCode/exo1/exo1 similarity index 100% rename from Dev1.1/OrganisationCode/exo1/exo1 rename to APL1.1/Dev1.1/OrganisationCode/exo1/exo1 diff --git a/Dev1.1/OrganisationCode/exo1/lire.h b/APL1.1/Dev1.1/OrganisationCode/exo1/lire.h similarity index 100% rename from Dev1.1/OrganisationCode/exo1/lire.h rename to APL1.1/Dev1.1/OrganisationCode/exo1/lire.h diff --git a/Dev1.1/OrganisationCode/exo1/lire.s b/APL1.1/Dev1.1/OrganisationCode/exo1/lire.s similarity index 100% rename from Dev1.1/OrganisationCode/exo1/lire.s rename to APL1.1/Dev1.1/OrganisationCode/exo1/lire.s diff --git a/Dev1.1/OrganisationCode/exo1/main.c b/APL1.1/Dev1.1/OrganisationCode/exo1/main.c similarity index 100% rename from Dev1.1/OrganisationCode/exo1/main.c rename to APL1.1/Dev1.1/OrganisationCode/exo1/main.c diff --git a/Dev1.1/OrganisationCode/exo1/options.c b/APL1.1/Dev1.1/OrganisationCode/exo1/options.c similarity index 100% rename from Dev1.1/OrganisationCode/exo1/options.c rename to APL1.1/Dev1.1/OrganisationCode/exo1/options.c diff --git a/Dev1.1/OrganisationCode/exo1/options.h b/APL1.1/Dev1.1/OrganisationCode/exo1/options.h similarity index 100% rename from Dev1.1/OrganisationCode/exo1/options.h rename to APL1.1/Dev1.1/OrganisationCode/exo1/options.h diff --git a/Dev1.1/OrganisationCode/exo1/personne.c b/APL1.1/Dev1.1/OrganisationCode/exo1/personne.c similarity index 100% rename from Dev1.1/OrganisationCode/exo1/personne.c rename to APL1.1/Dev1.1/OrganisationCode/exo1/personne.c diff --git a/Dev1.1/OrganisationCode/exo1/personne.h b/APL1.1/Dev1.1/OrganisationCode/exo1/personne.h similarity index 100% rename from Dev1.1/OrganisationCode/exo1/personne.h rename to APL1.1/Dev1.1/OrganisationCode/exo1/personne.h diff --git a/Dev1.1/OrganisationCode/exo1/repertoire.c b/APL1.1/Dev1.1/OrganisationCode/exo1/repertoire.c similarity index 100% rename from Dev1.1/OrganisationCode/exo1/repertoire.c rename to APL1.1/Dev1.1/OrganisationCode/exo1/repertoire.c diff --git a/Dev1.1/OrganisationCode/exo1/repertoire.h b/APL1.1/Dev1.1/OrganisationCode/exo1/repertoire.h similarity index 100% rename from Dev1.1/OrganisationCode/exo1/repertoire.h rename to APL1.1/Dev1.1/OrganisationCode/exo1/repertoire.h diff --git a/Dev1.1/Tableaux/Max b/APL1.1/Dev1.1/Tableaux/Max similarity index 100% rename from Dev1.1/Tableaux/Max rename to APL1.1/Dev1.1/Tableaux/Max diff --git a/Dev1.1/Tableaux/Maximum.c b/APL1.1/Dev1.1/Tableaux/Maximum.c similarity index 100% rename from Dev1.1/Tableaux/Maximum.c rename to APL1.1/Dev1.1/Tableaux/Maximum.c diff --git a/Dev1.1/Tableaux/Mirroir.c b/APL1.1/Dev1.1/Tableaux/Mirroir.c similarity index 100% rename from Dev1.1/Tableaux/Mirroir.c rename to APL1.1/Dev1.1/Tableaux/Mirroir.c diff --git a/Dev1.1/Tableaux/Remplissage b/APL1.1/Dev1.1/Tableaux/Remplissage similarity index 100% rename from Dev1.1/Tableaux/Remplissage rename to APL1.1/Dev1.1/Tableaux/Remplissage diff --git a/Dev1.1/Tableaux/Remplissage.c b/APL1.1/Dev1.1/Tableaux/Remplissage.c similarity index 100% rename from Dev1.1/Tableaux/Remplissage.c rename to APL1.1/Dev1.1/Tableaux/Remplissage.c diff --git a/Dev1.1/Tableaux/mir b/APL1.1/Dev1.1/Tableaux/mir similarity index 100% rename from Dev1.1/Tableaux/mir rename to APL1.1/Dev1.1/Tableaux/mir diff --git a/Dev1.1/Tableaux/mirroir.c b/APL1.1/Dev1.1/Tableaux/mirroir.c similarity index 100% rename from Dev1.1/Tableaux/mirroir.c rename to APL1.1/Dev1.1/Tableaux/mirroir.c diff --git a/Dev1.1/Tableaux/recherche.c b/APL1.1/Dev1.1/Tableaux/recherche.c similarity index 100% rename from Dev1.1/Tableaux/recherche.c rename to APL1.1/Dev1.1/Tableaux/recherche.c diff --git a/SCR1.1/.~lock.Clee.pub# b/APL1.1/SCR1.1/.~lock.Clee.pub# similarity index 100% rename from SCR1.1/.~lock.Clee.pub# rename to APL1.1/SCR1.1/.~lock.Clee.pub# diff --git a/SCR1.1/Clee b/APL1.1/SCR1.1/Clee similarity index 100% rename from SCR1.1/Clee rename to APL1.1/SCR1.1/Clee diff --git a/SCR1.1/Clee.pub b/APL1.1/SCR1.1/Clee.pub similarity index 100% rename from SCR1.1/Clee.pub rename to APL1.1/SCR1.1/Clee.pub diff --git a/SCR1.1/TP02/error_file b/APL1.1/SCR1.1/TP02/error_file similarity index 100% rename from SCR1.1/TP02/error_file rename to APL1.1/SCR1.1/TP02/error_file diff --git a/SCR1.1/TP02/fi b/APL1.1/SCR1.1/TP02/fi similarity index 100% rename from SCR1.1/TP02/fi rename to APL1.1/SCR1.1/TP02/fi diff --git a/SCR1.1/TP02/fifi b/APL1.1/SCR1.1/TP02/fifi similarity index 100% rename from SCR1.1/TP02/fifi rename to APL1.1/SCR1.1/TP02/fifi diff --git a/SCR1.1/TP02/output_and_error_file b/APL1.1/SCR1.1/TP02/output_and_error_file similarity index 100% rename from SCR1.1/TP02/output_and_error_file rename to APL1.1/SCR1.1/TP02/output_and_error_file diff --git a/SCR1.1/TP02/output_file b/APL1.1/SCR1.1/TP02/output_file similarity index 100% rename from SCR1.1/TP02/output_file rename to APL1.1/SCR1.1/TP02/output_file diff --git a/SCR1.1/TP02/tp02-reponses.txt b/APL1.1/SCR1.1/TP02/tp02-reponses.txt similarity index 100% rename from SCR1.1/TP02/tp02-reponses.txt rename to APL1.1/SCR1.1/TP02/tp02-reponses.txt diff --git a/SCR1.1/TP02/w b/APL1.1/SCR1.1/TP02/w similarity index 100% rename from SCR1.1/TP02/w rename to APL1.1/SCR1.1/TP02/w diff --git a/SCR1.1/TP02/wc b/APL1.1/SCR1.1/TP02/wc similarity index 100% rename from SCR1.1/TP02/wc rename to APL1.1/SCR1.1/TP02/wc diff --git a/SCR1.1/TP03/print_unicode_char.c b/APL1.1/SCR1.1/TP03/print_unicode_char.c similarity index 100% rename from SCR1.1/TP03/print_unicode_char.c rename to APL1.1/SCR1.1/TP03/print_unicode_char.c diff --git a/SCR1.1/TP03/rTP03 b/APL1.1/SCR1.1/TP03/rTP03 similarity index 100% rename from SCR1.1/TP03/rTP03 rename to APL1.1/SCR1.1/TP03/rTP03 diff --git a/SCR1.1/TP03/reponses b/APL1.1/SCR1.1/TP03/reponses similarity index 100% rename from SCR1.1/TP03/reponses rename to APL1.1/SCR1.1/TP03/reponses diff --git a/SCR1.1/TP04/tp04-reponses.txt b/APL1.1/SCR1.1/TP04/tp04-reponses.txt similarity index 100% rename from SCR1.1/TP04/tp04-reponses.txt rename to APL1.1/SCR1.1/TP04/tp04-reponses.txt diff --git a/SCR1.1/TP05/tp05-reponses.txt b/APL1.1/SCR1.1/TP05/tp05-reponses.txt similarity index 100% rename from SCR1.1/TP05/tp05-reponses.txt rename to APL1.1/SCR1.1/TP05/tp05-reponses.txt diff --git a/APL1.2/Dev1.2/Fichiers/Challenger b/APL1.2/Dev1.2/Fichiers/Challenger new file mode 100755 index 0000000..0c2915a Binary files /dev/null and b/APL1.2/Dev1.2/Fichiers/Challenger differ diff --git a/APL1.2/Dev1.2/Fichiers/Challenger.c b/APL1.2/Dev1.2/Fichiers/Challenger.c new file mode 100644 index 0000000..9ef01e3 --- /dev/null +++ b/APL1.2/Dev1.2/Fichiers/Challenger.c @@ -0,0 +1,24 @@ +#include +#include +int main(int argc, char** argv) { + int a,score; + int tab[10]; + char nom [3]; + FILE* flux; + FILE* flux2; + flux = fopen("/export/home/an21/vieirae/APL/APL1.2/Dev1.2/Fichiers/top10", "r"); + flux2 = fopen("/export/home/an21/vieirae/APL/APL1.2/Dev1.2/Fichiers/top10", "w"); + + if (flux == NULL) { + printf("accès au fichier impossible !"); + return EXIT_FAILURE; + } + fwrite (("%09d %c",argc[2],argv),4, 1,flux2); + for (int i = 0;i<11;i++){ + fread (&a,4,1,flux2); + fread (&tab, 1, 3,flux2); + printf ("%09d %s\n",a,tab); + } + fclose(flux); + return EXIT_SUCCESS; +} \ No newline at end of file diff --git a/APL1.2/Dev1.2/Fichiers/Records b/APL1.2/Dev1.2/Fichiers/Records new file mode 100755 index 0000000..7e361ad Binary files /dev/null and b/APL1.2/Dev1.2/Fichiers/Records differ diff --git a/APL1.2/Dev1.2/Fichiers/Records.c b/APL1.2/Dev1.2/Fichiers/Records.c new file mode 100644 index 0000000..ebaad18 --- /dev/null +++ b/APL1.2/Dev1.2/Fichiers/Records.c @@ -0,0 +1,21 @@ +#include +#include +int main() { + int a; + int tab[10]; + FILE* flux; + flux = fopen("/export/home/an21/vieirae/APL/APL1.2/Dev1.2/Fichiers/top10", "r"); + + + if (flux == NULL) { + printf("accès au fichier impossible !"); + return EXIT_FAILURE; + } + for (int i = 0;i<10;i++){ + fread (&a,4,1,flux); + fread (&tab, 1, 3,flux); + printf ("\| %09d \| %s \|\n",a,tab); + } + fclose(flux); + return EXIT_SUCCESS; +} \ No newline at end of file diff --git a/APL1.2/Dev1.2/Fichiers/top10 b/APL1.2/Dev1.2/Fichiers/top10 new file mode 100644 index 0000000..4b43675 --- /dev/null +++ b/APL1.2/Dev1.2/Fichiers/top10 @@ -0,0 +1 @@ +ví \ No newline at end of file diff --git a/APL1.2/Dev1.2/Structures/Signletons b/APL1.2/Dev1.2/Structures/Signletons new file mode 100755 index 0000000..898825f Binary files /dev/null and b/APL1.2/Dev1.2/Structures/Signletons differ diff --git a/APL1.2/Dev1.2/Structures/Singletons.c b/APL1.2/Dev1.2/Structures/Singletons.c new file mode 100644 index 0000000..c591aaa --- /dev/null +++ b/APL1.2/Dev1.2/Structures/Singletons.c @@ -0,0 +1,33 @@ +#include +#include + +int main (void) { + int entiers,i=0,j,k,NON=0; + printf("Combien d'entiers voulez-vous entrer ? :"); + scanf("%d",&entiers); + int tab[entiers-1]; + while (i < entiers){ + printf("Entrez la valeur %d : ", i+1); + scanf("%d",&j); + for (k=0; k<=i;k++){ + if (tab[k] == j ) { + NON = NON+1; + }else{ + tab[i] = j; + } + } + i++; + } + for (i=0;i " +exit +fi +if [[ $# -f $1]] +then +echo "File $1 does not exist !" +exit +fi +if [[ $# -f $2]] +thenecho -n "$2 exists. Overwrite ? Yes/No --> " +read answer +if [[answer == Yes]] +then cp /dev/null $2 +else done +fi +lignes = $(cat $1) +while read i +do + x = $(expr substr $i 1 8) + y = $(expr substr $i 9 8) + z = $(expr substr $i 17 8) + t = $(expr substr $i 25 8) + echo "$((2#$x)).$((2#$y)).$((2#$z)).$((2#$t))" + done <$1 >$2 + exit diff --git a/SCR1.2/TP08/TP08_reponses b/APL1.2/SCR1.2/TP08/TP08_reponses similarity index 100% rename from SCR1.2/TP08/TP08_reponses rename to APL1.2/SCR1.2/TP08/TP08_reponses diff --git a/APL1.2/SCR1.2/TP08/mult_mat.sh b/APL1.2/SCR1.2/TP08/mult_mat.sh new file mode 100644 index 0000000..9a66616 --- /dev/null +++ b/APL1.2/SCR1.2/TP08/mult_mat.sh @@ -0,0 +1,30 @@ +#!/bin/bash +if [[ $# -ne 2 ]] +then + echo "Usage: ./mult_mat.sh " + exit +fi +if [[ $1 -gt $2 ]] +then + echo "First argument must be less than second argument !!" + exit +fi +if [[ $1 -lt 0 ]] +then + echo "Arguments must be positive !!" + exit +fi +if [[ $2 -lt 0 ]] +then + echo "Arguments must be positive !!" + exit +fi +for ((i=$1;i<=$2;i++)) +do + for ((f=$1;f<=$2;f++)) + do + echo -ne "$((i*f))\t" + done + echo -e "\n" +done +exit diff --git a/APL1.2/SCR1.2/TP08/my_seq.sh b/APL1.2/SCR1.2/TP08/my_seq.sh new file mode 100644 index 0000000..6f141ba --- /dev/null +++ b/APL1.2/SCR1.2/TP08/my_seq.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +if [[ $# -lt 1 ]] +then + echo "usage:my_seq.sh " + exit +fi +if [[ $1 -lt 0 ]] +then + echo "Argument must be positive !!" + exit +fi +for ((i=1;i<=$1;i++)) +do echo $i +done +exit + diff --git a/APL1.2/SCR1.2/TP08/tkt.c b/APL1.2/SCR1.2/TP08/tkt.c new file mode 100644 index 0000000..85c9b1e --- /dev/null +++ b/APL1.2/SCR1.2/TP08/tkt.c @@ -0,0 +1,14 @@ +#include +#include + +int main (void) { + int i,j; + for (i=0;i<4;i++){ + for (k=0;k<4;k++){ + j = 10*i*i - 4*i*k + 10*k*k +3*i - 3*k + 2 + printf("%d",j); + } + printf("\n"); + } + return EXIT_SUCCESS; +} diff --git a/APL1.2/SCR1.2/TP08/tp08reponses.txt b/APL1.2/SCR1.2/TP08/tp08reponses.txt new file mode 100644 index 0000000..92c1e76 --- /dev/null +++ b/APL1.2/SCR1.2/TP08/tp08reponses.txt @@ -0,0 +1,89 @@ +1) a) for((i=1;i<=5;i++));do echo $i;done +for((i=1;i<=7;i++));do echo $i;done +b) !/bin/bash + +if [[ $# -lt 1 ]] +then + echo "usage:my_seq.sh " + exit +fi +if [[ $1 -lt 0 ]] +then + echo "Argument must be positive !!" + exit +fi +for ((i=1;i<=$1;i++)) +do echo $i +done +exit + +2) #!/bin/bash +if [[ $# -ne 2 ]] +then + echo "Usage: ./mult_mat.sh " + exit +fi +if [[ $1 -gt $2 ]] +then + echo "First argument must be less than second argument !!" + exit +fi +if [[ $1 -lt 0 ]] +then + echo "Arguments must be positive !!" + exit +fi +if [[ $2 -lt 0 ]] +then + echo "Arguments must be positive !!" + exit +fi +for ((i=$1;i<=$2;i++)) +do + for ((f=$1;f<=$2;f++)) + do + echo -ne "$((i*f))\t" + done + echo -e "\n" +done +exit +Par défaut, une variable non initialisée vaut "" +par exemple : +y = 3 +echo "$x est egal a $y" va renvoyer " est egal a 3" +le # sert à passer en décimal +3) +a) +#!/bin/bash +if [[ $# -lt 2]] +then ech"Usage: ./bin2dot-with-for.sh " +exit +fi +if [[ $# -f $1]] +then +echo "File $1 does not exist !" +exit +fi +if [[ $# -f $2]] +thenecho -n "$2 exists. Overwrite ? Yes/No --> " +read answer +if [[answer == Yes]] +then cp /dev/null $2 +else done +fi +lignes = $(cat $1) +for i in $lignes +do + x = $(expr substr $i 1 8) + y = $(expr substr $i 9 8) + z = $(expr substr $i 17 8) + t = $(expr substr $i 25 8) + echo "$((2#$x)).$((2#$y)).$((2#$z)).$((2#$t))" >> $2 + done + exit + +b) + b.a) 0 x=7 + b.b) 0 x= + b.c) 1 x= + b.d) \ No newline at end of file diff --git a/APL1.2/SCR1.2/TP09/TREE/lib/krb5/plugins/inout.dev b/APL1.2/SCR1.2/TP09/TREE/lib/krb5/plugins/inout.dev new file mode 100644 index 0000000..0e36aef --- /dev/null +++ b/APL1.2/SCR1.2/TP09/TREE/lib/krb5/plugins/inout.dev @@ -0,0 +1,48 @@ +#!/bin/bash +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +[[ $1 == "add" ]] || exit 0 +[[ $2 ]] || exit 1 + +exec depmod -a "$2" +#!/bin/bash +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +[[ $1 == "add" ]] || exit 0 +[[ $2 ]] || exit 1 + +exec depmod -a "$2" +#!/bin/bash +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +[[ $1 == "add" ]] || exit 0 +[[ $2 ]] || exit 1 + +exec depmod -a "$2" +#!/bin/bash +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +[[ $1 == "add" ]] || exit 0 +[[ $2 ]] || exit 1 + +exec depmod -a "$2" +#!/bin/bash +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +[[ $1 == "add" ]] || exit 0 +[[ $2 ]] || exit 1 + +exec depmod -a "$2" +#!/bin/bash +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +[[ $1 == "add" ]] || exit 0 +[[ $2 ]] || exit 1 + +exec depmod -a "$2" diff --git a/APL1.2/SCR1.2/TP09/TREE/lib/krb5/plugins/play.in b/APL1.2/SCR1.2/TP09/TREE/lib/krb5/plugins/play.in new file mode 100644 index 0000000..06d7405 Binary files /dev/null and b/APL1.2/SCR1.2/TP09/TREE/lib/krb5/plugins/play.in differ diff --git a/APL1.2/SCR1.2/TP09/TREE/lib/krb5/synch/atom.install b/APL1.2/SCR1.2/TP09/TREE/lib/krb5/synch/atom.install new file mode 100644 index 0000000..a793689 --- /dev/null +++ b/APL1.2/SCR1.2/TP09/TREE/lib/krb5/synch/atom.install @@ -0,0 +1,16 @@ +#!/bin/bash +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +[[ $1 == "add" ]] || exit 0 +[[ $2 ]] || exit 1 + +exec depmod -a "$2" +#!/bin/bash +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +[[ $1 == "add" ]] || exit 0 +[[ $2 ]] || exit 1 + +exec depmod -a "$2" diff --git a/APL1.2/SCR1.2/TP09/TREE/lib/krb5/synch/settings.sh b/APL1.2/SCR1.2/TP09/TREE/lib/krb5/synch/settings.sh new file mode 100644 index 0000000..ada62ea --- /dev/null +++ b/APL1.2/SCR1.2/TP09/TREE/lib/krb5/synch/settings.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +[[ $1 == "add" ]] || exit 0 +[[ $2 ]] || exit 1 + +exec depmod -a "$2" +#!/bin/bash +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +[[ $1 == "add" ]] || exit 0 +[[ $2 ]] || exit 1 + +exec depmod -a "$2" +#!/bin/bash +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +[[ $1 == "add" ]] || exit 0 +[[ $2 ]] || exit 1 + +exec depmod -a "$2" diff --git a/APL1.2/SCR1.2/TP09/arch_for_find.tar.gz b/APL1.2/SCR1.2/TP09/arch_for_find.tar.gz new file mode 100644 index 0000000..65a41e0 Binary files /dev/null and b/APL1.2/SCR1.2/TP09/arch_for_find.tar.gz differ diff --git a/APL1.2/SCR1.2/TP09/reponses_tp09.txt b/APL1.2/SCR1.2/TP09/reponses_tp09.txt new file mode 100644 index 0000000..e69de29