Modification de iut.h -> Ajout de fonctions pour la partie utilisateur, et nouvelles fonctions pour utilisateurIut.c
parent
efe1977036
commit
efe61267a1
@ -1 +1,46 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "iut.h"
|
||||
|
||||
void MenuUtilisateur(VilleIUT *tiut[],int n){
|
||||
int choix, succes;
|
||||
printf("\n1 - Recherche d'un IUT\n2 - Départements dans chaque IUT\n3 - Nombre de places en première année\n4 - Recherche d'un département\n5 - Quitter");
|
||||
scanf("%d%*c",&choix);
|
||||
if(choix==1){
|
||||
//Recherche de tel IUT
|
||||
succes = rechercheIUT(tiut);
|
||||
}
|
||||
if(choix==2){
|
||||
//creer departemement
|
||||
/*printf("\ndepartement :");
|
||||
scanf("%s",departement);
|
||||
printf("\nnombre de place :");
|
||||
scanf("%d",&nbp);
|
||||
printf("\nresponsable :");
|
||||
scanf("%s",respon);*/
|
||||
//V=Enfiler(V,departement,nbp,respon);
|
||||
}
|
||||
if(choix==3){
|
||||
//
|
||||
}
|
||||
if(choix==4){
|
||||
//
|
||||
}
|
||||
if(choix==5){
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
int rechercheIUT(VilleIUT *tiut[]){
|
||||
char rech[31];
|
||||
printf("Entrez le nom d'une ville ou d'un IUT : ");
|
||||
scanf("%s", &rech);
|
||||
if(rech==NULL){
|
||||
printf("NOPE");
|
||||
exit(1);
|
||||
}
|
||||
else
|
||||
printf("Succès");
|
||||
return 25;
|
||||
}
|
||||
|
Loading…
Reference in new issue