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.
55 lines
1.5 KiB
55 lines
1.5 KiB
#include "SAE.h"
|
|
|
|
void affichageVillesIUT(VilleIUT *tiut[], int nbIUT)
|
|
{
|
|
printf("Voici les villes qui ont un IUT :\n");
|
|
for (int i = 0; i < nbIUT; i++)
|
|
{
|
|
printf("\t%s\n", tiut[i]->ville);
|
|
}
|
|
}
|
|
|
|
void affichageDeptIUT(VilleIUT *tiut[], int nbIUT)
|
|
{
|
|
printf("Voici les départements présents dans chaque IUT :\n");
|
|
for (int i = 0; i < nbIUT; i++)
|
|
{
|
|
printf("\t%s :\n", tiut[i]->ville);
|
|
afficherDept(tiut[i]->ldept);
|
|
}
|
|
}
|
|
|
|
void affichageNbP(VilleIUT *tiut[], int nbIUT)
|
|
{
|
|
printf("Voici le nombre de places dans chaque département de chaque IUT :\n");
|
|
for (int iut = 0; iut < nbIUT; iut++)
|
|
{
|
|
printf("\t%s :\n", tiut[iut]->ville);
|
|
for (int dept = 0; dept < longueur(tiut[iut]->ldept); dept++)
|
|
{
|
|
printf("\t\t%s :\t%i\n", getDept(tiut[iut]->ldept, dept), getNbP(tiut[iut]->ldept, dept));
|
|
}
|
|
}
|
|
}
|
|
|
|
void affichageDeptParticulier(VilleIUT *tiut[], int nbIUT)
|
|
{
|
|
char deptRecherche[30];
|
|
bool trouve, deptExiste = false;
|
|
printf("Quel département souhaitez-vous rechercher ?\n> ");
|
|
scanf("%s", deptRecherche);
|
|
printf("Voici les villes possédant le département %s :\n", deptRecherche);
|
|
for (int iut = 0; iut < nbIUT; iut++)
|
|
{
|
|
rechercheDept(tiut[iut]->ldept, deptRecherche, &trouve);
|
|
if (trouve == true)
|
|
{
|
|
printf("\t%s\n", tiut[iut]->ville);
|
|
deptExiste = true;
|
|
}
|
|
}
|
|
if (deptExiste == false)
|
|
{
|
|
printf("\tAucun\n");
|
|
}
|
|
} |