You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.6 KiB

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "iut.h"
int main(){
int n, nc, codeErr, rootChoice=1, choix;
char sauv;
VilleIUT *tiut[200];
Candidat *tcandidat[200];
n=chargement(tiut ,200);
printf("Nombre de villes : %d\n",n);
nc=chargementcandidat(tcandidat ,200);
printf("\nNombre de candidat : %d\n",nc);
while(rootChoice==1){
system("cls"); // pour Windows
system("clear"); // pour Unix
printf("\t\tTableau Ville et departement\n");
affichage(tiut,n);
printf("\n\n\n\t\tTableau Candidat et choix\n");
affichageCandidatchoix(tcandidat,nc);
printf("\n\nUtilisateur - 1\tAdministrateur - 2\tCandidat - 3\tResponsable - 4\tSauvegarder et quitter - 5\n:");
scanf("%d",&choix);
if(choix==1){
printf("\nMenu Utilisateur");
MenuUtilisateur(tiut, n);
}
if(choix==2){
printf("\nMenu Administrateur");
MenuAdministrateur(tiut, n);
}
if(choix==3){
printf("\nMenu Candidat");
MenuCandidat(tcandidat, tiut, nc);
}
if(choix==4){
printf("\nMenu Responsable");
MenuRespon(tcandidat, tiut, n, nc);
}
if(choix==5){
printf(">----------------------------------------<\n\n");
codeErr = fsauvegarde(tiut, tcandidat, n, nc, choix, 200);
printf("\tTous les fichiers sauvegardés.\n\n");
printf("\tMerci de votre visite.\n\n");
printf("\t- Fin de journée -\n\n");
printf(">----------------------------------------<\n");
rootChoice = 0;
}
}
}