From a0a65c0e181c5a44a4f7168a5d1ab0abb880d552 Mon Sep 17 00:00:00 2001 From: "yann.champeau" Date: Fri, 13 Jan 2023 23:16:50 +0100 Subject: [PATCH] Ajustements. --- src/partie2/saeP2.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/partie2/saeP2.c b/src/partie2/saeP2.c index f3cb31b..6aeb81b 100644 --- a/src/partie2/saeP2.c +++ b/src/partie2/saeP2.c @@ -209,24 +209,24 @@ void CreateCandidat(candidat** tcandid,int* nbcandidat) perror("malloc"); exit(errno); } - printf("Merci de rentrez votre nom :"); + printf("Merci de rentrez votre nom : "); scanf("%*c"); fgets(Candidat_Ajout->name, 31, stdin); int i=0; while(Candidat_Ajout->name[i+1]!='\0')i++; Candidat_Ajout->name[i]='\0'; - printf("Merci de rentrez votre prénom :"); + printf("Merci de rentrez votre prénom : "); fgets(Candidat_Ajout->surname, 31, stdin); i=0; while(Candidat_Ajout->surname[i+1]!='\0')i++; Candidat_Ajout->surname[i]='\0'; - printf("Merci de rentrez votre note en Mathématique :"); + printf("Merci de rentrez votre note en Mathématique : "); scanf("%f",&Candidat_Ajout->note[0]); - printf("Merci de rentrez votre note en Français :"); + printf("Merci de rentrez votre note en Français : "); scanf("%f",&Candidat_Ajout->note[1]); - printf("Merci de rentrez votre note en Anglais :"); + printf("Merci de rentrez votre note en Anglais : "); scanf("%f",&Candidat_Ajout->note[2]); - printf("Merci de rentrez votre note en Spécialité :"); + printf("Merci de rentrez votre note en Spécialité : "); scanf("%f",&Candidat_Ajout->note[3]); tcandid=(candidat**)realloc(tcandid,sizeof(candidat)*((*nbcandidat)+1)); if (tcandid==NULL) @@ -239,4 +239,5 @@ void CreateCandidat(candidat** tcandid,int* nbcandidat) tcandid[*nbcandidat-1]=Candidat_Ajout; printf("Ajout fini\nVotre numéro de candidat est : %d",\ Candidat_Ajout->numcandid); + *nbcandidat+=1; } \ No newline at end of file