modifications ecommandées

master
antoine.perederii 2 years ago
parent 481a1cee76
commit efa6e4febb

@ -13,7 +13,7 @@
* \param nbElem taille logique du tableau
* \param noCarte numéro de la carte à rechercher
*/
int RechercheAjoutAdherent(int tNoCarte[], int nbElem, int noCarte)
int RechercheAjoutAdherent(int tNoCarte[], int nbElem)
{
int i;
while(i < nbElem)
@ -47,13 +47,13 @@ int AjoutAdherent(int tNoCarte[], int tAge[], int tPointsCarte[], int tCarteActi
printf("Donnez l'âge de l'adhérent : ");
scanf("%d", &age);
pas = RechercheAjoutAdherent(tNoCarte, nbElem, noCarte);
if (j == tMax)
{
printf("Tableau plein, impossible d'ajouter un adhérent.\n"); /* Pas besoins de le mettre dans la boucle for */
return -1;
}
for (j = nbElem; j > pas; j--)
{
if (j == tMax)
{
printf("Tableau plein, impossible d'ajouter un adhérent.\n"); /* Pas besoins de le mettre dans la boucle for */
return -1;
}
tNoCarte[j] = tNoCarte[j - 1];
tAge[j] = tAge[j - 1];
tPointsCarte[j] = tPointsCarte[j - 1];

Loading…
Cancel
Save