diff --git a/Partie_2/partie2.c b/Partie_2/partie2.c new file mode 100644 index 0000000..4704e2c --- /dev/null +++ b/Partie_2/partie2.c @@ -0,0 +1,19 @@ +#include "prototype.h" + +Liste inscription(Liste lCand, int nbInsc) +{ + Candidat c; + printf("Veuillez rentrer votre nom et prénom : "); + scanf("%s%*c%s", c.nom, c.prenom); + printf("Entrez les notes : "); + scanf("%f %f %f %f", c.lNote[0], c.lNote[1], c.lNote[2], c.lNote[3]); + c.nbChoix=0; + c.lChoix=NULL; + c.numC=nbInsc + 1 +} + +void affichage(Liste l) +{ + printf("Numéro \t Prénom \t Nom \t Notes \t Nombre voeux \t Voeux\n"); + +} \ No newline at end of file diff --git a/Partie_2/prototype.h b/Partie_2/prototype.h new file mode 100644 index 0000000..43bdb82 --- /dev/null +++ b/Partie_2/prototype.h @@ -0,0 +1,36 @@ +#include +#include +#include +#include + +typedef struct + { + int numC; + char prenom[20]; + char nom[20]; + float lNote[4]; + int nbChoix; + struct Choix lChoix[nbChoix]; + } Candidat; + +typedef struct + { + char ville; + char dpt; + int chDpt; + int chCand; + } Choix; + +typedef struct maillon + { + struct Candidat c; + struct maillon *suiv; + } Maillon, *Liste; + +Liste inscription(Liste lCand, int nbInsc); +Liste candidater(Liste lCand, Candidat c); +Liste modifier(Liste lCand, Candidat c); +Liste supprimer(Liste lCand, Candidat c); +void sauvegarder(Liste l); +void affichage(Liste l); +void global(void); \ No newline at end of file diff --git a/Partie_2/test.c b/Partie_2/test.c new file mode 100644 index 0000000..fc96c09 --- /dev/null +++ b/Partie_2/test.c @@ -0,0 +1,13 @@ +#include "prototype.h" + +void testInsc(void) +{ + Liste l; + int nb=0; + l=inscription(l, nb); +} + +int main(void) +{ + return 1; +} \ No newline at end of file