You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
1.5 KiB

/*
programme : commun.h
auteur : Lola Chalmin, Roxane Rossetto
date : 13/12/22
finalité : SAE 1.02 Algorithme
*/
/*
Brief :
*/
#define TAILLE 100;
typedef struct {
char ville[20];//ville choisie
char dptmt[20];//département choisi
int dec;//décision du choix
int valid;//validation du candidat
}Choix;
typedef struct Listchx{
Choix chx;
struct Listchx * suivchx;
}Maillonchx;
typedef Maillonchx * Listechx;
typedef struct {
int nEtu;//numéro d'étudiant
char nom[20];//nom de l'étudiant
char prenom[20];//prénom de l'étudiant
float moymat;//moyenne en maths
float moyfr;//moyenne en français
float moyen;//moyenne en anglais
float moyspe;//moyenne en spécialité
int nbchx;//nombre de choix
Listechx lchx;
}Candidat;
typedef struct Mailloncand{
Candidat cand;
struct Mailloncand * suivcand;
}Mailloncand;
typedef Mailloncand * Listecand;
Choix lirechx (void);
Choix lireC(FILE *fe);
Candidat lireCandidat(void);
Candidat lireCa(FILE *fe);
Listechx InsertTC(Listechx list, Maillonchx m);
Listechx InsertC(Listechx list, Maillonchx m);
void AffC(Candidat c);
void AffCh(Choix c);
void AffListeCandidat (Listecand l);
void AffListChoix(Listechx l);
Listecand recherchenom (Listecand l, char *nom );
Listecand recherchenum (Listecand l, int num);
Listecand Chargementlistecandidat(FILE *fe, Listecand lC, int *nbC);
Listecand Insert(Listecand list, Candidat c);
Listecand InsertT(Listecand list, Candidat c);
void test (void);
void testchgt(void);
void affpartonsenpete(Listecand lC, int nbC);