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.
59 lines
1.6 KiB
59 lines
1.6 KiB
#include "Fonctions.h"
|
|
|
|
void Affichage1Adherent(int tNoCarte[], int tAge[], int tPointsCarte[], int tCarteActive[], int nbElem)
|
|
{
|
|
int pas, noCarte, CarteActive, trouve;
|
|
printf("Entrez le numéro de la carte de l'adhérent recherché : ");
|
|
scanf("%d", &noCarte);
|
|
pas = RechercheAdherent(tNoCarte, nbElem, noCarte, &trouve);
|
|
if (trouve == 1)
|
|
{
|
|
printf("\nN° de carte\tAge\tPoints\tEtat\n");
|
|
printf("%d\t\t%d\t%d\t%d\n", tNoCarte[pas], tAge[pas], tPointsCarte[pas], tCarteActive[pas]);
|
|
}
|
|
else
|
|
{
|
|
printf("Ce numéro d'adhérent n'existe pas. Veuillez réessayer\n");
|
|
return;
|
|
}
|
|
}
|
|
|
|
void AffichageTousAdherents(int tNoCarte[], int tAge[], int tPointsCarte[], int tCarteActive[], int nbElem)
|
|
{
|
|
int i;
|
|
printf("\nN° de carte\tAge\tPoints\tEtat\n");
|
|
for (i = 0; i < nbElem; i++)
|
|
{
|
|
printf("%d\t\t%d\t%d\t%d\n", tNoCarte[i], tAge[i], tPointsCarte[i], tCarteActive[i]);
|
|
}
|
|
}
|
|
|
|
void AffichageNbEntreesTousJour(int tNbActivitesJour[], int tDate[], int nbElem)
|
|
{
|
|
int i;
|
|
printf("\nDate\tNb activités\n");
|
|
for (i = 0; i < nbElem; i++)
|
|
{
|
|
printf("%d\t%d\n", tDate[i], tNbActivitesJour[i]);
|
|
}
|
|
}
|
|
|
|
void AffichageNbEntreesTotal(int tNbActivitesJour[], int nbElem)
|
|
{
|
|
int i, somme = 0;
|
|
for (i = 0; i < nbElem; i++)
|
|
{
|
|
somme = somme + tNbActivitesJour[i];
|
|
}
|
|
printf("Le nombre total d'entrées est de %d depuis le début.\n", somme);
|
|
}
|
|
|
|
void AffichageNbAdherents(int nbElem)
|
|
{
|
|
int i, somme = 0;
|
|
for (i = 0; i < nbElem; i++)
|
|
{
|
|
somme = somme + 1;
|
|
}
|
|
printf("Le nombre total d'adhérents est de %d.\n", somme);
|
|
} |