Compare commits

...

2 Commits

@ -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)
@ -240,4 +240,5 @@ void CreateCandidat(candidat** tcandid,int* nbcandidat)
nbcandidat++;
printf("Ajout fini\nVotre numéro de candidat est : %d",\
Candidat_Ajout->numcandid);
*nbcandidat+=1;
}
Loading…
Cancel
Save