|
|
|
@ -273,7 +273,7 @@ void alimenterCarte (int tabAdherent[], int tabPoint[],int nb)
|
|
|
|
|
printf("Erreur ! Numéro de carte absente de la base de donnée\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ajoutActivite(int tabCoutPoint[],int tabNbEntree[],int tailleL)
|
|
|
|
|
void ajoutActivite(int tabCoutPoint[],int tailleL)
|
|
|
|
|
{
|
|
|
|
|
int num, nbPoint;
|
|
|
|
|
printf("Numéro de la Nouvelle Activité :");
|
|
|
|
@ -302,9 +302,11 @@ void suppActivite(int tabCoutPoint[], int tabNbEntree[],int tailleL)
|
|
|
|
|
scanf("%d%*c", &num);
|
|
|
|
|
if (tabCoutPoint[num] == 0)
|
|
|
|
|
printf("Numéro d'activité pas existant\n");
|
|
|
|
|
exit(1);
|
|
|
|
|
if (tailleL < num)
|
|
|
|
|
printf("tableau plein\n");
|
|
|
|
|
else
|
|
|
|
|
exit(1);
|
|
|
|
|
if (tabCoutPoint[num] != 0)
|
|
|
|
|
{
|
|
|
|
|
printf("Êtes vous sûre de vouloir supprimer l'activité (O|N): ");
|
|
|
|
|
scanf("%c%*c", &choix);
|
|
|
|
@ -325,6 +327,30 @@ void suppActivite(int tabCoutPoint[], int tabNbEntree[],int tailleL)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void modifActivite(int tabCoutPoint[],int tailleL )
|
|
|
|
|
{
|
|
|
|
|
int num, newCout;
|
|
|
|
|
printf("Quel Activité voulez vous modifier : ");
|
|
|
|
|
scanf("%d%*c", &num);
|
|
|
|
|
if (tabCoutPoint[num] == 0)
|
|
|
|
|
printf("Numéro d'activité pas existant\n");
|
|
|
|
|
if (tailleL < num)
|
|
|
|
|
printf("tableau plein\n");
|
|
|
|
|
if (tabCoutPoint[num] != 0)
|
|
|
|
|
{
|
|
|
|
|
printf("Nouveau coût de l'activité: ");
|
|
|
|
|
scanf("%d", &newCout);
|
|
|
|
|
while(newCout <= 0)
|
|
|
|
|
{
|
|
|
|
|
printf("votre activite doit valoir plus de 0 points\n");
|
|
|
|
|
printf("Nouveau coût de l'activité: ");
|
|
|
|
|
scanf("%d", &newCout);
|
|
|
|
|
}
|
|
|
|
|
tabCoutPoint[num] = newCout;
|
|
|
|
|
printf("L'activité coûte désormais %d", tabCoutPoint[num]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void faireActivite(int tabAdherent[], int tabPoint[],int tabCoutPoint[], int tabNbEntree[], int tailleLAdhe, int tailleLAct)
|
|
|
|
|
{
|
|
|
|
|
int num, idAct, i, trouve;
|
|
|
|
@ -344,7 +370,7 @@ void faireActivite(int tabAdherent[], int tabPoint[],int tabCoutPoint[], int tab
|
|
|
|
|
scanf("%d", &idAct);
|
|
|
|
|
if (idAct == -1)
|
|
|
|
|
{
|
|
|
|
|
printf("annulation réservation Activité !\n")
|
|
|
|
|
printf("annulation réservation Activité !\n");
|
|
|
|
|
exit(1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -360,6 +386,7 @@ void faireActivite(int tabAdherent[], int tabPoint[],int tabCoutPoint[], int tab
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int SauvegardeAdherent(int tabAdherent[], int tabPoints[], int jour[], int mois[], int annee[], int carte[], int tailleL) {
|
|
|
|
|
int i;
|
|
|
|
|
FILE* flot = fopen("adherent.txt","w");
|
|
|
|
|