Yann CHAMPEAU 3 years ago
commit 646f7830d9

Binary file not shown.

@ -22,9 +22,10 @@ void menuUser(VilleIUT* lvIUT[],int tlogi, int CandidOpen, candidat* tcandidat[]
printf("2 : Afficher tout les départements de chaques IUT\n");
printf("3 : Afficher le nombre de place en première année d'un IUT précis avec un département précis\n");
printf("4 : Rechercher les IUTs possèdant un département précis.\n");
printf("5 : S'enregistrer en tant que candidat.")
if(CandidOpen)
{
printf("5 : Candidater\n");
printf("6 : Candidater\n");
}
printf("9 : Revenir à l'écran de sélection du profil.\n\n");
printf("#--------------------------------------------------------------------#\n\n");
@ -52,13 +53,17 @@ void menuUser(VilleIUT* lvIUT[],int tlogi, int CandidOpen, candidat* tcandidat[]
reset();
break;
case 5:
CreateCandidat(tcandid,nbcandidat);
reset();
break;
case 6:
if(CandidOpen)
{
//candidater(......);
}
reset();
break;
case 6:
case 8:
//fonctionp4?????????();
reset();
break;

@ -182,3 +182,31 @@ void Candidater(VilleIUT* tiut[],int *tlogi, candidat* tcandidat, int numcandid)
}
}
void CreateCandidat(candidat** tcandid,int* nbcandidat)
{
candidat* Candidat_Ajout
printf("Merci de rentrez votre nom :");
fgets(Candidat_Ajout->name, 31, stdin);
printf("Merci de rentrez votre prénom :");
fgets(Candidat_Ajout->surname, 31, stdin);
printf("Merci de rentrez votre note en Mathématique :");
scanf("%d",Candidat_Ajout->note[0]);
printf("Merci de rentrez votre note en Français :");
scanf("%d",Candidat_Ajout->note[1]);
printf("Merci de rentrez votre note en Anglais :");
scanf("%d",Candidat_Ajout->note[2]);
printf("Merci de rentrez votre note en Spécialité :");
scanf("%d",Candidat_Ajout->note[3]);
(candidat**) realloc (tcandid,sizeof(candidat)*((*nbcandidat)++));
if (tcandid==NULL)
{
fprintf(stderr,"Tableau candidat corrompue\n");
perror("Erreur :");
exit(errno);
}
tcandid[nbcandidat-1]=Candidat_Ajout;
printf("Ajout fini\nVotre numéro de candidat est : %d",\
Candidat_Ajout->numcandid);
}

@ -260,6 +260,7 @@ int* fusion(tabG,tailleG,tabNoteG,tabD,tailleD,tabNoteD,retNote){
int* tri_fusion_rec(int tabIDCandidatAttente[], int tabNote[], int taille){
if(taille==1) return tabIDCandidatAttente;
int tabNoteG[taille/2], tabNoteD[taille-taille/2], retNote[taille];
tabcpy(tabNote,tabNoteG,taille/2);
tabcpy(tabNote+taille/2,tabNoteD,taille);

Loading…
Cancel
Save