diff --git a/Candidat.don b/Candidat.don new file mode 100644 index 0000000..2923763 --- /dev/null +++ b/Candidat.don @@ -0,0 +1,4 @@ +226584 bachelard benjamin 20 17.5 19 3 +Clermont Informatique 0 0 +Grenoble Informatique 0 0 +Aurillac Informatique 0 0 diff --git a/adminIut.c b/adminIut.c index 5d78c8d..6e122f0 100644 --- a/adminIut.c +++ b/adminIut.c @@ -5,7 +5,7 @@ void MenuAdministrateur(VilleIUT *tiut[],int n){ char departement[30], respon[30], Vmodif[31],tVille[31], tdepartemnt[30], AouD; - int choix, nbp, i, j, comp, Mnbp, BloqueChangV, BloqueChangD; + int choix, nbp, i, j, comp, Mnbp,good=0; VilleIUT V; printf("\n0-Revenir au menu\n1-Modifier place\n2-Creer un departement\n3-supprimer un département\n4-Lancer et Arreter la phase de canditature\n5-modifier nom responsable :"); @@ -21,21 +21,26 @@ void MenuAdministrateur(VilleIUT *tiut[],int n){ scanf("%s",Vmodif); printf("\ndepartement à modifier:"); scanf("%s",departement); - for(j=0;iville, Vmodif); if(comp==0){ - (strcmp(tiut[i]->ldept->departement, departement) == 0 && tiut[i]->ldept->AouD == 'D'); - printf("pb departement arret phase de candidature"); - choix=0; - } + for(j=0;j<3;j++){ + if(strcmp(tiut[j]->ldept->departement, departement) == 0 && tiut[j]->ldept->AouD == 'D'){ + printf("pb departement arret phase de candidature\n"); + good=1; + } + } + } } - printf("\nnombre de place apres modification :"); - scanf("%d",&Mnbp); - for(i=0;iville, Vmodif); - if(comp==0){ - tiut[i]->ldept=ModifinbP(tiut[i]->ldept,departement,Mnbp,n); - } + if(good==0){ + printf("\nnombre de place apres modification :"); + scanf("%d",&Mnbp); + for(i=0;iville, Vmodif); + if(comp==0){ + tiut[i]->ldept=ModifinbP(tiut[i]->ldept,departement,Mnbp,n); + } + } } } @@ -103,9 +108,6 @@ void MenuAdministrateur(VilleIUT *tiut[],int n){ affichage(tiut,n); } - - - ListeD suppressionTete(ListeD ld){ ListeD ldsvt; ldsvt=ld->suivant; diff --git a/iut.h b/iut.h index 6e4a700..2d40ac0 100644 --- a/iut.h +++ b/iut.h @@ -1,22 +1,32 @@ #include -/* -typedef struct { - int numero; - char nom[50]; - char prenom[50]; - int notes[4]; - int nb_choix; -} Candidat; + // Structure pour stocker les informations sur un choix d'un candidat -typedef struct { +typedef struct{ + float Français; + float Maths; + float Anglais; +}note; + +typedef struct liste{ char ville[50]; char departement[50]; int decision; int validation; -} Choix; -*/ + struct liste *suivant; +} Choix, *ListeC; + +typedef struct liste{ + int numero; + char nom[50]; + char prenom[50]; + note note; + int nb_choix; + ListeC lchoix; + struct liste *suivant; +} Candidat; + typedef struct liste{ char departement[30];