diff --git a/Candidres.txt b/Candidres.txt index 7b17346..ec2bef4 100644 --- a/Candidres.txt +++ b/Candidres.txt @@ -5,7 +5,7 @@ Bocluse Paul Clermont-Ferrand 2 Informatique -0 +1 0 Réseaux 0 @@ -42,7 +42,7 @@ Qui Roté Don Clermont-Ferrand 2 Informatique -0 +1 0 Réseaux 0 @@ -53,7 +53,7 @@ Cool Michel Clermont-Ferrand 2 Informatique -0 +1 0 Réseaux 0 @@ -64,7 +64,7 @@ Skater Matteo Clermont-Ferrand 2 Informatique -0 +2 0 Réseaux 0 diff --git a/SAE 1.02.pdf b/SAE 1.02.pdf new file mode 100644 index 0000000..4b13611 Binary files /dev/null and b/SAE 1.02.pdf differ diff --git a/SAE.c b/SAE.c index 799fbb6..c6f6653 100644 --- a/SAE.c +++ b/SAE.c @@ -964,6 +964,13 @@ void supprimerCandid(Candidat **tab, int *nbEle) return; } +void decalagenom(char* tab, int pos, int nbEle) +{ + int i; + for(i = pos; i < nbEle - 1; i++) + tab[i] = tab[i + 1]; +} + Candidat **reallocTCandid(Candidat **tab, int *tailleP) { Candidat **aux; @@ -987,9 +994,9 @@ void creationCandid(VilleIUT **tiut, int nbIUT, Candidat **tcandid, int *nbCandi while(1) { idAdd = tcandid[*nbCandid - 1]->id + 1; - printf("Votre prénom : "); - scanf("%s%*c", prenom); printf("Votre nom : "); + scanf("%s%*c", prenom); + printf("Votre prénom : "); fgets(nom,30, stdin); nom[strlen(nom) - 1] = '\0'; printf("%s %s\n", prenom, nom); @@ -1020,7 +1027,7 @@ void creationCandid(VilleIUT **tiut, int nbIUT, Candidat **tcandid, int *nbCandi printf("voulez vous faire votre choix maintenant (oui|non) : "); scanf("%s", choix); if (strcmp(choix, "oui")==0) - modifCandid(tcandid, *nbCandid, tiut, 0, *nbCandid - 1); + modifCandid(tcandid, *nbCandid, tiut, nbIUT, *nbCandid - 1); if (strcmp(choix, "non")==0) break; return; @@ -1892,7 +1899,7 @@ int decision(void) return choix; } -void gérerAdmiCandid(Candidat **tab, int nbCandid) +void gererAdmiCandid(Candidat **tab, int nbCandid) { int id, pos, trouve, i, irech; char ville[30], dept[30], choix; @@ -1955,6 +1962,8 @@ void gérerAdmiCandid(Candidat **tab, int nbCandid) break; } } + if (!verifSelection()) + break; } } if(!verifSelection()) @@ -1968,9 +1977,4 @@ void gérerAdmiCandid(Candidat **tab, int nbCandid) } } -void decalagenom(char* tab, int pos, int nbEle) -{ - int i; - for(i = pos; i < nbEle - 1; i++) - tab[i] = tab[i + 1]; -} + diff --git a/SAE.h b/SAE.h index 1ef37f1..3fc19a3 100644 --- a/SAE.h +++ b/SAE.h @@ -190,6 +190,8 @@ void gestionCandid(VilleIUT **tiut, int nbIUT, Candidat **tcandid, int *nbCandid int menuGestionCandid(void); +void decalagenom(char* tab, int pos, int nbEle); + ListeCandid recherchecandidIUT(ListeCandid l, char code[]); int recherchecandidDept(ChoixDept **tab,int nbEle, char code[],int *trouve); @@ -260,6 +262,4 @@ void rejeterVoeux(ListeCandid l, char ville[]); int decision(void); -void gérerAdmiCandid(Candidat **tab, int nbCandid); - -void decalagenom(char* tab, int pos, int nbEle); \ No newline at end of file +void gererAdmiCandid(Candidat **tab, int nbCandid); \ No newline at end of file diff --git a/candidAdmis.txt b/candidAdmis.txt index fe415d2..511f8e6 100644 --- a/candidAdmis.txt +++ b/candidAdmis.txt @@ -1,2 +1,3 @@ Paul Bocluse 12.0 Don Qui Roté 10.0 +Michel Cool 13.2 diff --git a/candidMEA.txt b/candidMEA.txt index bde0876..82d0817 100644 --- a/candidMEA.txt +++ b/candidMEA.txt @@ -1,2 +1 @@ -Michel Cool 13.2 Matteo Skater 13.0 diff --git a/exe b/exe index ed58654..24bcd31 100755 Binary files a/exe and b/exe differ diff --git a/res.txt b/res.txt index ca0a2d9..5a3b9ab 100644 --- a/res.txt +++ b/res.txt @@ -1,8 +1,8 @@ Clermont-Ferrand 2 -Informatique 130 Bouhours Cédric -Réseaux 5 Unmec Sympa +Informatique 130 Bouhours Cédric +Réseaux 5 Unmec Sympa Lyon 2 -GEA 8 Marx Karl -Jeux-videos 24 Kojima Hideo +GEA 8 Marx Karl +Jeux-videos 24 Kojima Hideo