|
|
|
@ -34,28 +34,28 @@ int chargementAdherent(int tabAdherent[], int tabPoints[], int jour[], int mois[
|
|
|
|
|
return i;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// int chargementActivite(int tabPoint[],int tabNbEntree[], int tphys)
|
|
|
|
|
// {
|
|
|
|
|
// int num, point, nbEntree, i =0;
|
|
|
|
|
// FILE*flot;
|
|
|
|
|
// flot = fopen("activite.txt","r");
|
|
|
|
|
// fscanf(flot,"%d %d %d",&num, &point, &nbEntree);
|
|
|
|
|
// while(!feof(flot))
|
|
|
|
|
// {
|
|
|
|
|
// if(i >= tphys)
|
|
|
|
|
// {
|
|
|
|
|
// printf("tableau plein\n");
|
|
|
|
|
// fclose(flot);
|
|
|
|
|
// return -1;
|
|
|
|
|
// }
|
|
|
|
|
// tabPoint[num] = point;
|
|
|
|
|
// tabNbEntree[num] = nbEntree;
|
|
|
|
|
// i = i + 1;
|
|
|
|
|
// fscanf(flot,"%d %d %d",&num, &point, &nbEntree);
|
|
|
|
|
// }
|
|
|
|
|
// fclose(flot);
|
|
|
|
|
// return i;
|
|
|
|
|
// }
|
|
|
|
|
int chargementActivite(int tabPoint[],int tabNbEntree[], int tphys)
|
|
|
|
|
{
|
|
|
|
|
int num, point, nbEntree, i =0;
|
|
|
|
|
FILE*flot;
|
|
|
|
|
flot = fopen("activite.txt","r");
|
|
|
|
|
fscanf(flot,"%d %d %d",&num, &point, &nbEntree);
|
|
|
|
|
while(!feof(flot))
|
|
|
|
|
{
|
|
|
|
|
if(i >= tphys)
|
|
|
|
|
{
|
|
|
|
|
printf("tableau plein\n");
|
|
|
|
|
fclose(flot);
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
tabPoint[num] = point;
|
|
|
|
|
tabNbEntree[num] = nbEntree;
|
|
|
|
|
i = i + 1;
|
|
|
|
|
fscanf(flot,"%d %d %d",&num, &point, &nbEntree);
|
|
|
|
|
}
|
|
|
|
|
fclose(flot);
|
|
|
|
|
return i;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int recherche(int tabTri[], int val, int nb, int *trouve){
|
|
|
|
@ -250,57 +250,52 @@ void affichageCarte(int tabAdhe[], int tabPoints[], int jour[], int mois[], int
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// void affichageActivite(int tabCoutPoint[], int tabNbEntree[], int tailleL)
|
|
|
|
|
// {
|
|
|
|
|
// int i;
|
|
|
|
|
// printf("N°Activité \t Points \t Nombre Entrées \n");
|
|
|
|
|
// for (i = 0; i < tailleL; i++)
|
|
|
|
|
// {
|
|
|
|
|
// if (tabCoutPoint[i] != 0)
|
|
|
|
|
// printf("%d \t %d \t %d", i, tabCoutPoint[i], tabNbEntree[i]\n);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// void affichageToutActivite(int tabCoutPoint[], int tabNbEntree[], int tailleL)
|
|
|
|
|
// {
|
|
|
|
|
// int i, num, trouve = 0;
|
|
|
|
|
// printf("Plus d'information de l'activité :");
|
|
|
|
|
// scanf("%d", &num);
|
|
|
|
|
// printf("N°Activité \t Points \t Nombre Entrées \n");
|
|
|
|
|
// for (i = 0; i < tailleL; i++)
|
|
|
|
|
// {
|
|
|
|
|
// if (i == num)
|
|
|
|
|
// {
|
|
|
|
|
// printf("%d \t %d \t %d", i, tabCoutPoint[i], tabNbEntree[i]\n);
|
|
|
|
|
// trouve = 1;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// if (trouve == 0)
|
|
|
|
|
// printf("Le numéro d'activité n'éxiste pas");
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// void afficheNbEntreAct(int tabNbEntree[], int tabCoutPoint[], int tphys)
|
|
|
|
|
// {
|
|
|
|
|
// int num;
|
|
|
|
|
// printf("numero d’activité :");
|
|
|
|
|
// scanf("%d",&num);
|
|
|
|
|
// if (tabCoutPoint[num] == 0 && tabNbEntree[num] == 0)
|
|
|
|
|
// printf("Activité inexistante\n");
|
|
|
|
|
// else
|
|
|
|
|
// printf("Nombre d’entrée : %d", tabNbEntree[num]);
|
|
|
|
|
void affichageToutActivite(int tabCoutPoint[], int tabNbEntree[], int tailleL)
|
|
|
|
|
{
|
|
|
|
|
int i;
|
|
|
|
|
printf("N°Activité \t Points \t Nombre Entrées \n");
|
|
|
|
|
for (i = 0; i < tailleL; i++)
|
|
|
|
|
{
|
|
|
|
|
if (tabCoutPoint[i] != 0)
|
|
|
|
|
printf("%d \t\t %d \t\t %d\n", i, tabCoutPoint[i], tabNbEntree[i]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void affichageActivite(int tabCoutPoint[], int tabNbEntree[], int tailleL)
|
|
|
|
|
{
|
|
|
|
|
int num;
|
|
|
|
|
printf("Plus d'information de l'activité :");
|
|
|
|
|
scanf("%d", &num);
|
|
|
|
|
if (tabCoutPoint[num] == 0)
|
|
|
|
|
printf("Le numéro d'activité n'éxiste pas\n");
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
printf("N°Activité \t Points \t Nombre Entrées \n");
|
|
|
|
|
printf("%d \t\t %d \t\t %d\n", num, tabCoutPoint[num], tabNbEntree[num]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void afficheNbEntreAct(int tabNbEntree[], int tabCoutPoint[], int tphys)
|
|
|
|
|
{
|
|
|
|
|
int num;
|
|
|
|
|
printf("numero d’activité :");
|
|
|
|
|
scanf("%d",&num);
|
|
|
|
|
if (tabCoutPoint[num] == 0 && tabNbEntree[num] == 0)
|
|
|
|
|
printf("Activité inexistante\n");
|
|
|
|
|
else
|
|
|
|
|
printf("Nombre d’entrée : %d", tabNbEntree[num]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void alimenterCarte (int tabAdherent[], int tabPoint[],int nb)
|
|
|
|
|
{
|
|
|
|
|
int num, trouve, i;
|
|
|
|
|
char formule;
|
|
|
|
|
printf("numero carte :");
|
|
|
|
|
scanf("%d",&num);
|
|
|
|
|
scanf("%d%*c",&num);
|
|
|
|
|
i = recherche(tabAdherent, num, nb, &trouve);
|
|
|
|
|
if (trouve == 1)
|
|
|
|
|
{
|
|
|
|
@ -309,29 +304,29 @@ void alimenterCarte (int tabAdherent[], int tabPoint[],int nb)
|
|
|
|
|
printf("B : 10€ -> 12 point\n");
|
|
|
|
|
printf("C : 15€ -> 20 point\n");
|
|
|
|
|
printf("Choisir :");
|
|
|
|
|
scanf("%*c%c", &formule);
|
|
|
|
|
while (formule != 'A' || formule != 'B' || formule != 'C')
|
|
|
|
|
scanf("%c%*c", &formule);
|
|
|
|
|
while (formule != 'A' && formule != 'B' && formule != 'C')
|
|
|
|
|
{
|
|
|
|
|
printf("Erreur récupération de donnée\n");
|
|
|
|
|
printf("A : 5€ -> 5 points\n");
|
|
|
|
|
printf("B : 10€ -> 12 point\n");
|
|
|
|
|
printf("C : 15€ -> 20 point\n");
|
|
|
|
|
printf("Choisir :");
|
|
|
|
|
scanf("%*c%c", &formule);
|
|
|
|
|
scanf("%c%*c", &formule);
|
|
|
|
|
}
|
|
|
|
|
if (formule == 'A')
|
|
|
|
|
{
|
|
|
|
|
tabAdherent[i] = tabAdherent[i] + 5;
|
|
|
|
|
tabPoint[i] = tabPoint[i] + 5;
|
|
|
|
|
printf("accréditation de 5 points\n");
|
|
|
|
|
}
|
|
|
|
|
if (formule == 'B')
|
|
|
|
|
{
|
|
|
|
|
tabAdherent[i] = tabAdherent[i] + 12;
|
|
|
|
|
tabPoint[i] = tabPoint[i] + 12;
|
|
|
|
|
printf("accréditation de 12 points\n");
|
|
|
|
|
}
|
|
|
|
|
if (formule == 'C')
|
|
|
|
|
{
|
|
|
|
|
tabAdherent[i] = tabAdherent[i] + 20;
|
|
|
|
|
tabPoint[i] = tabPoint[i] + 20;
|
|
|
|
|
printf("accréditation de 20 points\n");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -339,89 +334,116 @@ 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)
|
|
|
|
|
// {
|
|
|
|
|
// int num, nbPoint;
|
|
|
|
|
// printf("Numéro de la Nouvelle Activité :");
|
|
|
|
|
// scanf("%d", &num);
|
|
|
|
|
// if (tabCoutPoint[num] != 0)
|
|
|
|
|
// printf("Numéro d'activité déjà existant.\n");
|
|
|
|
|
// if (tailleL < num)
|
|
|
|
|
// printf("tableau plein");
|
|
|
|
|
// else
|
|
|
|
|
// {
|
|
|
|
|
// printf("Coût de l'activité :");
|
|
|
|
|
// scanf("%d", &nbPoint);
|
|
|
|
|
// printf("\t Récapitulatif :");
|
|
|
|
|
// printf("Numéro d'activité : %d\n", num);
|
|
|
|
|
// printf("Nombre de point : %d\n", nbPoint);
|
|
|
|
|
// tabCoutPoint[num] = nbPoint;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// void suppActivite(int tabCoutPoint[], int tabNbEntree[],int tailleL)
|
|
|
|
|
// {
|
|
|
|
|
// int num;
|
|
|
|
|
// char choix;
|
|
|
|
|
// printf("Quel Activité voulez vous supprimer : ");
|
|
|
|
|
// scanf("%d", &num);
|
|
|
|
|
// if (tabCoutPoint[num] == 0)
|
|
|
|
|
// printf("Numéro d'activité pas existant\n");
|
|
|
|
|
// if (tailleL < num)
|
|
|
|
|
// printf("tableau plein\n");
|
|
|
|
|
// else
|
|
|
|
|
// {
|
|
|
|
|
// printf("Êtes vous sûre de vouloir supprimer l'activité (O|N): ");
|
|
|
|
|
// scanf("%*c%c", choix);
|
|
|
|
|
// while(choix != 'N' || choix != 'O')
|
|
|
|
|
// {
|
|
|
|
|
// printf("Êtes vous sûre de vouloir supprimer l'activité (O|N): ");
|
|
|
|
|
// scanf("%*c%c", choix);
|
|
|
|
|
// }
|
|
|
|
|
// if (choix == 'N')
|
|
|
|
|
// printf("Annulation de la suppression\n");
|
|
|
|
|
// if (choix == 'O')
|
|
|
|
|
// {
|
|
|
|
|
// printf("Suppression Activité %d\n", num);
|
|
|
|
|
// tabCoutPoint[num] = 0;
|
|
|
|
|
// tabNbEntree[num] = 0;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// void faireActivite(int tabAdherent[], int tabPoint[],int tabCoutPoint[], int tabNbEntree[], int tailleLAdhe, int tailleLAct)
|
|
|
|
|
// {
|
|
|
|
|
// int num, idAct, i, trouve;
|
|
|
|
|
// printf("Identifiant Adhérent : ");
|
|
|
|
|
// scanf("%d", &num);
|
|
|
|
|
// i = recherche(tabAdherent, num, tailleLAdhe, &trouve)
|
|
|
|
|
// if (trouve == 0)
|
|
|
|
|
// printf("Identifiant Adhérent pas existant\n");
|
|
|
|
|
// else
|
|
|
|
|
// {
|
|
|
|
|
// printf("Numéro d'activité que vous voulez pratiquer : ");
|
|
|
|
|
// scanf("%d", &idAct);
|
|
|
|
|
// while (tabCoutPoint[idAct] == 0)
|
|
|
|
|
// {
|
|
|
|
|
// printf("Activité inexistante\n");
|
|
|
|
|
// printf("Numéro d'activité que vous voulez pratiquer : ");
|
|
|
|
|
// scanf("%d", &idAct);
|
|
|
|
|
// if (idAct == -1)
|
|
|
|
|
// exit(1);
|
|
|
|
|
// }
|
|
|
|
|
// if (tabCoutPoint[idAct] > tabPoint[i])
|
|
|
|
|
// printf("Vous n'avez pas assez de point");
|
|
|
|
|
// else{
|
|
|
|
|
// tabPoint[i] = tabPoint[i] - tabCoutPoint[idAct];
|
|
|
|
|
// printf("Achat effectué\n");
|
|
|
|
|
// printf("Il vous reste %d point sur votre carte\n", tabPoint[i]);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
void ajoutActivite(int tabCoutPoint[],int tailleL)
|
|
|
|
|
{
|
|
|
|
|
int num, nbPoint;
|
|
|
|
|
printf("Numéro de la Nouvelle Activité :");
|
|
|
|
|
scanf("%d", &num);
|
|
|
|
|
if (tabCoutPoint[num] != 0)
|
|
|
|
|
printf("Numéro d'activité déjà existant.\n");
|
|
|
|
|
if (tailleL < num)
|
|
|
|
|
printf("tableau plein");
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
printf("Coût de l'activité :");
|
|
|
|
|
scanf("%d", &nbPoint);
|
|
|
|
|
printf("\t Récapitulatif \n:");
|
|
|
|
|
printf("Numéro d'activité : %d\n", num);
|
|
|
|
|
printf("Nombre de point : %d\n", nbPoint);
|
|
|
|
|
tabCoutPoint[num] = nbPoint;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void suppActivite(int tabCoutPoint[], int tabNbEntree[],int tailleL)
|
|
|
|
|
{
|
|
|
|
|
int num;
|
|
|
|
|
char choix;
|
|
|
|
|
printf("Quel Activité voulez vous supprimer : ");
|
|
|
|
|
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("Êtes vous sûre de vouloir supprimer l'activité (O|N): ");
|
|
|
|
|
scanf("%c%*c", &choix);
|
|
|
|
|
while(choix != 'N' && choix != 'O')
|
|
|
|
|
{
|
|
|
|
|
printf("Êtes vous sûre de vouloir supprimer l'activité (O|N): ");
|
|
|
|
|
scanf("%c%*c", &choix);
|
|
|
|
|
}
|
|
|
|
|
if (choix == 'N')
|
|
|
|
|
printf("Annulation de la suppression\n");
|
|
|
|
|
if (choix == 'O')
|
|
|
|
|
{
|
|
|
|
|
printf("Suppression Activité %d\n", num);
|
|
|
|
|
tabCoutPoint[num] = 0;
|
|
|
|
|
tabNbEntree[num] = 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
printf("Identifiant Adhérent : ");
|
|
|
|
|
scanf("%d", &num);
|
|
|
|
|
i = recherche(tabAdherent, num, tailleLAdhe, &trouve);
|
|
|
|
|
if (trouve == 0)
|
|
|
|
|
printf("Identifiant Adhérent pas existant\n");
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
printf("Numéro d'activité que vous voulez pratiquer : ");
|
|
|
|
|
scanf("%d", &idAct);
|
|
|
|
|
while (tabCoutPoint[idAct] == 0)
|
|
|
|
|
{
|
|
|
|
|
printf("Activité inexistante\n");
|
|
|
|
|
printf("Numéro d'activité que vous voulez pratiquer : ");
|
|
|
|
|
scanf("%d", &idAct);
|
|
|
|
|
if (idAct == -1)
|
|
|
|
|
{
|
|
|
|
|
printf("annulation réservation Activité !\n");
|
|
|
|
|
exit(1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (tabCoutPoint[idAct] > tabPoint[i])
|
|
|
|
|
printf("Vous n'avez pas assez de point");
|
|
|
|
|
else{
|
|
|
|
|
tabPoint[i] = tabPoint[i] - tabCoutPoint[idAct];
|
|
|
|
|
printf("Achat effectué\n");
|
|
|
|
|
printf("Il vous reste %d point sur votre carte\n", tabPoint[i]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int SauvegardeAdherent(int tabAdherent[], int tabPoints[], int jour[], int mois[], int annee[], int carte[], int tailleL) {
|
|
|
|
|
int i;
|
|
|
|
@ -437,21 +459,46 @@ int SauvegardeAdherent(int tabAdherent[], int tabPoints[], int jour[], int mois[
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// int SauvegardeActivite(int tabCoutPoint[],int tabNbEntree[],int tailleL)
|
|
|
|
|
// {
|
|
|
|
|
// int i;
|
|
|
|
|
// FILE* flot = fopen("activite.txt","w");
|
|
|
|
|
// if (flot == NULL) {
|
|
|
|
|
// printf("Erreur d'ouverture du fichier !\n");
|
|
|
|
|
// return -1;
|
|
|
|
|
// }
|
|
|
|
|
// for (i = 0 ; i < tailleL ; i++) {
|
|
|
|
|
// if (tabCoutPoint[num] != 0)
|
|
|
|
|
// fprintf(flot,"%d %d %d",i, tabCoutPoint[i], tabNbEntree[i]);
|
|
|
|
|
// }
|
|
|
|
|
// fclose(flot);
|
|
|
|
|
// return 0;
|
|
|
|
|
// }
|
|
|
|
|
int SauvegardeActivite(int tabCoutPoint[],int tabNbEntree[],int tailleL)
|
|
|
|
|
{
|
|
|
|
|
int i;
|
|
|
|
|
FILE* flot = fopen("activite.txt","w");
|
|
|
|
|
if (flot == NULL) {
|
|
|
|
|
printf("Erreur d'ouverture du fichier !\n");
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
for (i = 0 ; i < tailleL ; i++) {
|
|
|
|
|
if (tabCoutPoint[i] != 0)
|
|
|
|
|
fprintf(flot,"%d %d %d\n",i, tabCoutPoint[i], tabNbEntree[i]);
|
|
|
|
|
}
|
|
|
|
|
fclose(flot);
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int Sauvegarde(int tabAdhe[],int tabPoints[], int jour[], int mois[], int annee[], int carte[], int tabCoutPoint[], int tabNbEntree[], int tailleAdhe, int tailleAct) {
|
|
|
|
|
int codeSauv, coderetourAdhe = -1, coderetourAct;
|
|
|
|
|
printf("Sauvegarder ? (1 : Oui, 2 : Non)\n");
|
|
|
|
|
scanf("%d",&codeSauv);
|
|
|
|
|
if (codeSauv == 1) {
|
|
|
|
|
|
|
|
|
|
while(coderetourAdhe == -1 || coderetourAct == -1) {
|
|
|
|
|
coderetourAdhe = SauvegardeAdherent(tabAdhe,tabPoints, jour, mois, annee, carte, tailleAdhe);
|
|
|
|
|
coderetourAct = SauvegardeActivite(tabCoutPoint,tabNbEntree,tailleAct);
|
|
|
|
|
if (coderetourAdhe == 0 && coderetourAct == 0) {
|
|
|
|
|
printf("Sauvegarde réussie !\n");
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
printf("Sauvegarde échouée\n");
|
|
|
|
|
printf("Réessayer ?(1 : Oui, 2 : Non\n");
|
|
|
|
|
scanf("%d",&codeSauv);
|
|
|
|
|
if (codeSauv == 2) break;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|