Siwa12100 2 years ago
commit 6365db1560

@ -175,4 +175,9 @@ VilleIut * initialiseIut(void);
VilleIut * lireIut (FILE * fichier); VilleIut * lireIut (FILE * fichier);
VilleIut ** chargeIutDon(char nomFichier[], int * nbIut, int * nbMax); VilleIut ** chargeIutDon(char nomFichier[], int * nbIut, int * nbMax);
VilleIut ** initialiseTabIut(void); VilleIut ** initialiseTabIut(void);
void tailleSupTabIut(VilleIut ** tIut, int *nbMax); void tailleSupTabIut(VilleIut ** tIut, int *nbMax);
// candidat.c
Candidat *modifierCandidat(Candidat *c);

@ -0,0 +1,26 @@
#include "../header/sae.h"
Candidat *modifierCandidat(Candidat *c)
{
int choix;
printf("Que voulez vous modifier\n1-Le nom\n2-Le Prenom\n3-Les notes\n");
scanf("%d", &choix);
switch (choix)
{
case 1:
printf("Nom actuel : %s\nVeuillez saisir le nouveau nom\n", c->nom);
fgets(c->nom, 50, stdin);
c->nom[strlen(c->nom) - 1] = '\0';
break;
case 2:
printf("Prenom actuel : %s\nVeuillez saisir le nouveau prenom\n", c->prenom);
fgets(c->nom, 50, stdin);
c->nom[strlen(c->nom) - 1] = '\0';
break;
case 3:
printf("Voici les notes actuels : %.2f %.2f %.2f %.2f\nVeuillez saisir les nouvelles notes(note1/note2/note3/note4", c->notes[0], c->notes[1], c->notes[2], c->notes[3]);
scanf("%f/%f/%f/%f", &c->notes[0], &c->notes[1], &c->notes[2], &c->notes[3]);
break;
}
}

@ -738,7 +738,14 @@ void afficherCandidats(Candidat **candidats, int nbCandidats)
} }
} }
/**
* @brief Permet de créer un candidat
*
* @param tCand Tableau de pointeur sur une structure de candidat
* @param nbCandidats nombre de candidats créés
*
* @return Retourne le nombre de candidats
*/
int creerCandidat(Candidat *tCand[], int nbCandidats) int creerCandidat(Candidat *tCand[], int nbCandidats)
{ {
int i=0; int i=0;
@ -814,6 +821,8 @@ lChoix supprimerCandidature( lChoix l, int * nbchoix)
return l; return l;
} }
/* /*
================================================ ================================================
Partie 3 Partie 3

Loading…
Cancel
Save