une version qui marche pour sur

master
Lola CHALMIN 2 years ago
parent c97bbc3695
commit 4970551be4

@ -42,7 +42,7 @@ Candidat lireCandidat(void)//fonction qui lit un candidat sur le clavier
{
Candidat c;
printf("Numéro de candidat :\n");
scanf("%d", &c.nEtu);
scanf("%d%*c", &c.nEtu);
printf("Nom du candidat :\n");
fgets(c.nom, 20, stdin);
printf("Prénom du candidat :\n");
@ -56,12 +56,10 @@ Candidat lireCandidat(void)//fonction qui lit un candidat sur le clavier
printf("Moyenne de spécialité au choix :\n");
scanf("%f", &c.moyspe);
printf("Nombre de choix :\n");
scanf("%d", &c.nbchx);
scanf("%d", nbchx);
scanf("%d%*c", &c.nbchx);
return c;
}
<<<<<<< HEAD
@ -88,15 +86,15 @@ Candidat lireCandidat(void)//fonction qui lit un candidat sur le clavier
/*
Choix * chargeChoix(Choix *tchoix, TAILLE, nbchx){
}
*/
=======
void AffC(Candidat c)
{
printf("%d\n", c.nEtu);
@ -104,4 +102,3 @@ void AffC(Candidat c)
printf("%.2f\t%.2f\t%.2f\t%.2f\n", c.moymat,c.moyfr, c.moyen, c.moyspe);
printf("%d\n", c.nbchx);
}
>>>>>>> refs/remotes/origin/master

@ -36,6 +36,7 @@ typedef struct {
Candidat lireCandidat(void);
Choix lirechx (void);
void AffC(Candidat c);

BIN
test

Binary file not shown.

@ -8,5 +8,8 @@ int main(void)
{
Candidat c;
c = lireCandidat();
AffC(c);
Choix chx;
chx = lirechx();
return 0;
}
Loading…
Cancel
Save