|
|
@ -99,7 +99,22 @@ int choixMenuAffichage(void)
|
|
|
|
scanf("%d", &choix);
|
|
|
|
scanf("%d", &choix);
|
|
|
|
return choix;
|
|
|
|
return choix;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void Affichage1Adherent()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void AffichageTousAdherents()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void AffichageNbEntreesJour()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void AffichageNbEntreesTousJours()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
void gestionMatieres(void)
|
|
|
|
void gestionMatieres(void)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int tNoCarte[20] = {0}, tage[20] = {0}, tPointsCarte[20] = {0}, tCarteActive[20] = {0};
|
|
|
|
int tNoCarte[20] = {0}, tage[20] = {0}, tPointsCarte[20] = {0}, tCarteActive[20] = {0};
|
|
|
@ -112,12 +127,12 @@ void gestionMatieres(void)
|
|
|
|
return ;
|
|
|
|
return ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
choix = choixMenu();
|
|
|
|
choix = choixMenu();
|
|
|
|
while(choix != 9)
|
|
|
|
while(choix != 8)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if(choix == 1)
|
|
|
|
if(choix == 1)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
choix = choixMenuAffichage();
|
|
|
|
choix = choixMenuAffichage();
|
|
|
|
while(choix != 9)
|
|
|
|
while(choix != 6)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if(choix == 1)
|
|
|
|
if(choix == 1)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -125,53 +140,49 @@ void gestionMatieres(void)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(choix == 2)
|
|
|
|
if(choix == 2)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
modificationCoefficient(tMatieres, tCoeff, nbMatieres);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(choix == 3)
|
|
|
|
if(choix == 3)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
nbMatieres = insertionNewMatiere(tMatieres, tCoeff, nbMatieres, max);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(choix == 4)
|
|
|
|
if(choix == 4)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
nbMatieres = suppressionMatiere(tMatieres, tCoeff, nbMatieres);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(choix == 5)
|
|
|
|
if(choix == 5)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
MoyenneNotesMatiere(tMatieres, tNotes, tNbNotes, nbMatieres);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(choix == 6)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
MoyenneEtudiant(tCoeff, tMatieres, tNotes, tNbNotes, nbMatieres);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
choix = choixMenu();
|
|
|
|
choix = choixMenuAffichage();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(choix == 2)
|
|
|
|
if(choix == 2)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
modificationCoefficient(tMatieres, tCoeff, nbMatieres);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(choix == 3)
|
|
|
|
if(choix == 3)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
nbMatieres = insertionNewMatiere(tMatieres, tCoeff, nbMatieres, max);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(choix == 4)
|
|
|
|
if(choix == 4)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
nbMatieres = suppressionMatiere(tMatieres, tCoeff, nbMatieres);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(choix == 5)
|
|
|
|
if(choix == 5)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
MoyenneNotesMatiere(tMatieres, tNotes, tNbNotes, nbMatieres);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(choix == 6)
|
|
|
|
if(choix == 6)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
MoyenneEtudiant(tCoeff, tMatieres, tNotes, tNbNotes, nbMatieres);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
choix = choixMenu();
|
|
|
|
choix = choixMenu();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
sauvegarde(tMatieres, tCoeff, nbMatieres);
|
|
|
|
sauvegarde(tNoCarte, tage, tPointsCarte, tCarteActive, tNbActivitesJour, tDate, nbelem);
|
|
|
|
exit(1);
|
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/*
|
|
|
|
|
|
|
|
int Sauvegarde(int tNoCarte[], int tage[], int tPointsCarte[], int tCarteActive[], int tNbActivitesJour[], int tDate[], int nbelem)
|
|
|
|
int Sauvegarde(int tNoCarte[], int tage[], int tPointsCarte[], int tCarteActive[], int tNbActivitesJour[], int tDate[], int nbelem)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int i, j;
|
|
|
|
int i, j;
|
|
|
@ -200,6 +211,9 @@ int Sauvegarde(int tNoCarte[], int tage[], int tPointsCarte[], int tCarteActive[
|
|
|
|
fclose(flot);
|
|
|
|
fclose(flot);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void ajouterPoints(int tNumCarte[], int tPoints[], int tailleLog)
|
|
|
|
void ajouterPoints(int tNumCarte[], int tPoints[], int tailleLog)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
@ -344,16 +358,11 @@ int CreationAdherents(int tNoCarte[], int tage[], int tPointsCarte[], int tCarte
|
|
|
|
nbelem = nbelem + 1;
|
|
|
|
nbelem = nbelem + 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
void pointsBonus()
|
|
|
|
void pointsBonus()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int CreationAdherents(int tAdherents[], nbClients)
|
|
|
|
int CreationAdherents(int tAdherents[], nbClients)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int NoCarte, nom, prenom, age, pointsCarte, CarteActive, nbActivitéesJour;
|
|
|
|
int NoCarte, nom, prenom, age, pointsCarte, CarteActive, nbActivitéesJour;
|
|
|
|