From 1c9e3366e7325036a79dc21349c02804a3e7e485 Mon Sep 17 00:00:00 2001 From: Roxane ROSSETTO Date: Tue, 13 Dec 2022 17:25:52 +0100 Subject: [PATCH] quelques fonctions supplementaires --- commun.c | 93 +++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 62 insertions(+), 31 deletions(-) diff --git a/commun.c b/commun.c index 7f306a7..50cea5d 100644 --- a/commun.c +++ b/commun.c @@ -4,7 +4,7 @@ #include "commun.h" - +##########################TABLEAU POINTEUR##################################################### Choix lirechx (void){ Choix chx; @@ -23,21 +23,6 @@ Choix lirechx (void){ - - - - - - - - - - - - - - - Candidat lireCandidat(void)//fonction qui lit un candidat sur le clavier { Candidat c; @@ -60,24 +45,45 @@ Candidat lireCandidat(void)//fonction qui lit un candidat sur le clavier return c; } -<<<<<<< HEAD -======= +/* +Choix * chargeChoix(Choix *tchoix, TAILLE, nbchx){ + +} +*/ +void AffC(Candidat c) +{ + printf("%d\n", c.nEtu); + printf("%s \n %s\n", c.nom, c.prenom); + printf("%.2f\t%.2f\t%.2f\t%.2f\n", c.moymat,c.moyfr, c.moyen, c.moyspe); + printf("%d\n", c.nbchx); +} +######################################### LISTES ########################################## +void AffListeCandidat (Liste l){ + if ( l == NULL) return; + AffC(l->ON A PAS ENCORE STRUCT) + AffListeCandidat(l->suivant); +} +Liste recherche (Liste l, char *nom ){ + if ( l == NULL ){ return l;} + if ( strcmp ( l->Candidat.nom, nom ) == 0) return l; + return recherche (l->suivant, nom ); +} @@ -86,22 +92,47 @@ Candidat lireCandidat(void)//fonction qui lit un candidat sur le clavier ->>>>>>> refs/remotes/origin/master -/* -Choix * chargeChoix(Choix *tchoix, TAILLE, nbchx){ - -} -*/ -void AffC(Candidat c) -{ - printf("%d\n", c.nEtu); - printf("%s \n %s\n", c.nom, c.prenom); - printf("%.2f\t%.2f\t%.2f\t%.2f\n", c.moymat,c.moyfr, c.moyen, c.moyspe); - printf("%d\n", c.nbchx); -} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +####################################### FILES ################################################# \ No newline at end of file