|
|
|
@ -34,13 +34,33 @@ void MenuUtilisateur(VilleIUT *tiut[], int n){
|
|
|
|
|
|
|
|
|
|
int rechercheIUT(VilleIUT *tiut[], int n){
|
|
|
|
|
char rech[31];
|
|
|
|
|
int i;
|
|
|
|
|
int i, trouve = 0;
|
|
|
|
|
printf("Entrez le nom d'une ville ou d'un IUT : ");
|
|
|
|
|
scanf("%s", &rech);
|
|
|
|
|
for(i=0;i<n;i++){
|
|
|
|
|
for(i=0;i<n && trouve!=1;i++){
|
|
|
|
|
if(strcmp(tiut[i]->ville, rech)==0){
|
|
|
|
|
printf("Trouvé");
|
|
|
|
|
printf("Il y a un IUT à %s.\n", rech);
|
|
|
|
|
trouve = 1;
|
|
|
|
|
}
|
|
|
|
|
else if(i==n-1)
|
|
|
|
|
printf("Il n'y pas d'IUT dans votre ville.");
|
|
|
|
|
}
|
|
|
|
|
return 2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int rechercheDept(VilleIUT *tiut[], int n){
|
|
|
|
|
char rech[31];
|
|
|
|
|
int i, trouve = 0;
|
|
|
|
|
printf("Entrez le nom d'une ville ou d'un IUT : ");
|
|
|
|
|
scanf("%s", &rech);
|
|
|
|
|
for(i=0;i<n && trouve!=1;i++){
|
|
|
|
|
if(strcmp(tiut[i]->ville, rech)==0){
|
|
|
|
|
printf("Il y a un IUT à %s.\n\nListe des départements :\n", rech);
|
|
|
|
|
affichageListe(tiut[i]->ldept);
|
|
|
|
|
trouve = 1;
|
|
|
|
|
}
|
|
|
|
|
else if(i==n-1)
|
|
|
|
|
printf("Il n'y pas d'IUT dans votre ville.");
|
|
|
|
|
}
|
|
|
|
|
return 2;
|
|
|
|
|
}
|
|
|
|
|