|
|
@ -37,15 +37,12 @@ Choix lirechx (void){
|
|
|
|
Candidat lireCandidat(void)//fonction qui lit un candidat sur le clavier
|
|
|
|
Candidat lireCandidat(void)//fonction qui lit un candidat sur le clavier
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Candidat c;
|
|
|
|
Candidat c;
|
|
|
|
int nEtu,nbchx;
|
|
|
|
|
|
|
|
float moymat, moyfr, moyen, moyspe;
|
|
|
|
|
|
|
|
char nom[20], prenom[20];
|
|
|
|
|
|
|
|
printf("Numéro de candidat :\n");
|
|
|
|
printf("Numéro de candidat :\n");
|
|
|
|
scanf("%d", &c.nEtu);
|
|
|
|
scanf("%d", &c.nEtu);
|
|
|
|
printf("Nom du candidat :\n");
|
|
|
|
printf("Nom du candidat :\n");
|
|
|
|
fgets();
|
|
|
|
fgets(c.nom, 20, stdin);
|
|
|
|
printf("Prénom du candidat :\n");
|
|
|
|
printf("Prénom du candidat :\n");
|
|
|
|
fgets();
|
|
|
|
fgets(c.prenom, 20, stdin);
|
|
|
|
printf("Moyenne de maths :\n");
|
|
|
|
printf("Moyenne de maths :\n");
|
|
|
|
scanf("%f", &c.moymat);
|
|
|
|
scanf("%f", &c.moymat);
|
|
|
|
printf("Moyenne de français :\n");
|
|
|
|
printf("Moyenne de français :\n");
|
|
|
@ -57,6 +54,13 @@ Candidat lireCandidat(void)//fonction qui lit un candidat sur le clavier
|
|
|
|
printf("Nombre de choix :\n");
|
|
|
|
printf("Nombre de choix :\n");
|
|
|
|
scanf("%d", &c.nbchx);
|
|
|
|
scanf("%d", &c.nbchx);
|
|
|
|
scanf("%d", nbchx);
|
|
|
|
scanf("%d", nbchx);
|
|
|
|
kdjfbnjn
|
|
|
|
return c;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
}
|