parent
4bf69334da
commit
7e14d40e1a
@ -1,60 +0,0 @@
|
||||
#include "prototype.h"
|
||||
|
||||
Liste listenouv(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool vide(Liste l)
|
||||
{
|
||||
return l==NULL;
|
||||
}
|
||||
|
||||
Liste inserer(Liste l, Candidat can)
|
||||
{
|
||||
Maillon *m;
|
||||
m=(Maillon*)malloc(sizeof(Maillon));
|
||||
if (vide(m))
|
||||
{
|
||||
printf("Pb malloc\n");
|
||||
exit(1);
|
||||
}
|
||||
m->c=&can;
|
||||
m->suiv=l;
|
||||
m->h=m->h+1;
|
||||
return m;
|
||||
}
|
||||
|
||||
void affichageT(Liste l)
|
||||
/*affiche la liste de tous les candidats*/
|
||||
{
|
||||
printf("Numéro \tPrénom \tNom\n");
|
||||
affichage1(*l->c);
|
||||
}
|
||||
|
||||
void affichage1(Candidat c)
|
||||
/*affiche les informations d'un candidat*/
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
printf("%d \t%s \t%s\n", c.numC, c.prenom, c.nom);
|
||||
=======
|
||||
printf("%d \t%s\n", c.numC, c.prenom);
|
||||
>>>>>>> da798d175361ad41eae45376654f22a314f7aa87
|
||||
}
|
||||
|
||||
Liste inscription(Liste lCand, int nbInsc)
|
||||
/* inscript un candidat en rentrant toutes ses informations*/
|
||||
{
|
||||
Candidat c;
|
||||
printf("Veuillez rentrer votre prénom : ");
|
||||
scanf("%s", c.prenom);
|
||||
printf("%s\n", c.prenom);
|
||||
printf("Veuillez rentrer votre nom : ");
|
||||
scanf("%s", c.nom);
|
||||
printf("%s\n", c.nom);
|
||||
c.nbChoix=0;
|
||||
c.lChoix=NULL;
|
||||
c.numC=nbInsc + 1;
|
||||
lCand=inserer(lCand, c);
|
||||
return lCand;
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
#include<stdio.h>
|
||||
#include<stdlib.h>
|
||||
#include<string.h>
|
||||
#include<stdbool.h>
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char ville;
|
||||
char dpt;
|
||||
int chDpt;
|
||||
int chCand;
|
||||
} Choix;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int numC;
|
||||
char prenom[20];
|
||||
char nom[20];
|
||||
float lNote[4];
|
||||
int nbChoix;
|
||||
Choix *lChoix;
|
||||
} Candidat;
|
||||
|
||||
typedef struct maillon
|
||||
{
|
||||
Candidat *c;
|
||||
struct maillon *suiv;
|
||||
int h;
|
||||
} Maillon, *Liste;
|
||||
|
||||
/*Implémentation liste*/
|
||||
Liste listenouv(void);
|
||||
void affichageT(Liste l);
|
||||
void affichage1(Candidat c);
|
||||
void global(void);
|
||||
|
||||
/*Reste*/
|
||||
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);
|
@ -1,16 +0,0 @@
|
||||
#include "prototype.h"
|
||||
|
||||
void testInsc(void)
|
||||
{
|
||||
Liste l;
|
||||
int nb=0;
|
||||
l=listenouv();
|
||||
l=inscription(l, nb);
|
||||
affichageT(l);
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
testInsc();
|
||||
return 1;
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
#include "SAE.h"
|
||||
|
||||
void validationAdmission()
|
||||
{
|
||||
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
#include "SAE.h"
|
||||
|
Loading…
Reference in new issue