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.
47 lines
1.1 KiB
47 lines
1.1 KiB
#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\n");
|
|
scanf("%d%*c",&choix);
|
|
if(choix==1){
|
|
//Recherche de tel IUT
|
|
succes = rechercheIUT(tiut, n);
|
|
}
|
|
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[], int n){
|
|
char rech[31];
|
|
int i;
|
|
printf("Entrez le nom d'une ville ou d'un IUT : ");
|
|
scanf("%s", &rech);
|
|
for(i=0;i<n;i++){
|
|
if(strcmp(tiut[i]->ville, rech)==0){
|
|
printf("Trouvé");
|
|
}
|
|
}
|
|
return 2;
|
|
}
|