From ced6e6266b1b11d041e7b68502e2857fb2ca55cc Mon Sep 17 00:00:00 2001 From: "matheo.thierry" Date: Sat, 17 Dec 2022 09:43:19 +0100 Subject: [PATCH] MODIF ajout affichage pour test P2 --- sae1-02.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sae1-02.c b/sae1-02.c index abd8cbf..20ded41 100644 --- a/sae1-02.c +++ b/sae1-02.c @@ -133,17 +133,27 @@ void affichage(Listchoixdept c){ affichage(c->suivant); } } +void affichageetu(listetuinfo a){ + printf("%d\n%s %s\n", a.numeroetu, a.nometu, a.prenometu); + printf("mathématique : %d\n", a.notes[0]); + printf("français : %d\n", a.notes[1]); + printf("anglais : %d\n", a.notes[2]); + printf("matière spé : %d\n", a.notes[3]); +} void test1(void){ listetuinfo *tetu[5000]; + listchoix lc; int j,i, nb; char nomFich[31]; strcpy(nomFich, "candidature.txt"); nb = chargeretudiant(nomFich, tetu); for(j=0; jnbchoix; i++){ printf("carte %d={", i+1); - affichage(tetu[j].lchoixdept); + lc = tetu[j]->lchoixdept; + affichage(lc); } } }