creation structure partie deux plus creation fichier chargement des candidat

master
Benjamin BACHELARD 2 years ago
parent 7069392e53
commit 805c03aeea

@ -0,0 +1,4 @@
226584 bachelard benjamin 20 17.5 19 3
Clermont Informatique 0 0
Grenoble Informatique 0 0
Aurillac Informatique 0 0

@ -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;i<n;i++){
for(i=0;i<n;i++){
comp=strcmp(tiut[i]->ville, 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;i<n;i++){
comp=strcmp(tiut[i]->ville, 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;i<n;i++){
comp=strcmp(tiut[i]->ville, 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;

32
iut.h

@ -1,22 +1,32 @@
#include <stdio.h>
/*
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];

Loading…
Cancel
Save