fonction creerCandidat finie normalment youpi

master
Guillaume 2 years ago
commit 723a412eae

@ -131,9 +131,15 @@ void afficheNbPlacesDep(VilleIut *tiut[], int nbVilles, char nomDept[]);
int existeVille( VilleIut *tiut[], char ville[], int nbvilles ); int existeVille( VilleIut *tiut[], char ville[], int nbvilles );
void menuAdmin(VilleIut *tiut[], int nbVilles); void menuAdmin(VilleIut *tiut[], int nbVilles);
<<<<<<< HEAD
void afficherCandidat(Candidat candidat); void afficherCandidat(Candidat candidat);
void afficherCandidats(Candidat *candidats, int nbCandidats); void afficherCandidats(Candidat *candidats, int nbCandidats);
int creerCandidat(Candidat *tCand[], int nbCandidats); int creerCandidat(Candidat *tCand[], int nbCandidats);
=======
void afficherUnCandidat(Candidat candidat);
void afficherCandidats(Candidat **candidats, int nbCandidats);
int creerCandid(Candidat tCand[], int nbCandidats);
>>>>>>> bcdeb24491974b30c7e1ad6913f0e3fa2c3be9c3
ListeDeptV2 configurationDeptV2( ListeDept ldept ); ListeDeptV2 configurationDeptV2( ListeDept ldept );

@ -701,22 +701,27 @@ void menuAdmin(VilleIut **villeIut, int nbVilles)
* @brief Affiche les informations d'un candidat * @brief Affiche les informations d'un candidat
* @param candidat Le candidat à afficher * @param candidat Le candidat à afficher
*/ */
/* void afficherCandidat(Candidat candidat) void afficherUnCandidat(Candidat candidat)
{ {
printf("Numéro du candidat : %d\n", candidat.numero); int c = 1;
printf("Nom : %s\n", candidat.nom); printf("Candidat numero %7d ", candidat.numero);
printf("Prénom : %s\n", candidat.prenom); printf(" | Nom : %10s | ", candidat.nom);
printf("Notes : %.2f %.2f %.2f %.2f\n", candidat.notes[0], candidat.notes[1], candidat.notes[2], candidat.notes[3]); printf(" Prenom : %10s | ", candidat.prenom);
printf("Nombre de choix : %d\n", candidat.nbChoix); printf(" | Notes : %2f %2f %2f %2f | ", candidat.notes[0], candidat.notes[1], candidat.notes[2], candidat.notes[3]);
for (int i = 0; i < candidat.nbChoix; i++) printf(" Nombre de choix : %d\n\n", candidat.nbChoix);
printf(" \n Choix du candidat :\n");
printf( " -------------------\n\n");
while ( candidat.lchoix != NULL )
{ {
printf("Choix %d :\n", i + 1); printf(" %d.) Iut : %10s ; departement : %10s ; decision Departement : %d ; validation candidat : %d\n",
printf(" Ville : %s\n", candidat.choix[i].ville); candidat.lchoix -> ville, candidat.lchoix -> departement, candidat.lchoix -> decisionDepartement,
printf(" Département : %s\n", candidat.choix[i].departement); candidat.lchoix -> validationCandidat);
printf(" Décision du département : %d\n", candidat.choix[i].decisionDepartement);
printf(" Validation : %d\n", candidat.choix[i].validationCandidat);
} }
} */
printf(" \n\n");
}
/** /**
* @brief Affiche la liste des candidats * @brief Affiche la liste des candidats
@ -724,15 +729,13 @@ void menuAdmin(VilleIut **villeIut, int nbVilles)
* @param candidats Le tableau de candidats à afficher * @param candidats Le tableau de candidats à afficher
* @param nbCandidats Le nombre de candidats dans le tableau * @param nbCandidats Le nombre de candidats dans le tableau
*/ */
/*void afficherCandidats(Candidat *candidats, int nbCandidats) void afficherCandidats(Candidat **candidats, int nbCandidats)
{ {
for (int i = 0; i < nbCandidats; i++) for (int i = 0; i < nbCandidats; i++)
{ printf("\nCandidat numero %8d | Nom : %10s | Prenom : %10s \n", candidats[i] -> numero,
printf("\nCandidat %d :\n", i + 1); candidats[i] -> nom, candidats[i] -> prenom);
afficherCandidat(candidats[i]);
}
} }
*/
int creerCandidat(Candidat *tCand[], int nbCandidats) int creerCandidat(Candidat *tCand[], int nbCandidats)
{ {

Loading…
Cancel
Save