master
L0ol4X 2 years ago
parent 23c17fd14c
commit 9c211d289d

@ -202,8 +202,8 @@ int Acti(int i)
{ {
int acti; int acti;
printf("Choix de l'activité %d: badminton (1) | football (2) | zumba (3) | musculation (4) | squash (5) \n", i); printf("Choix de l'activité %d: badminton (1) | football (2) | zumba (3) | musculation (4) | squash (5) \n", i);
scanf("%*c%d", &acti); scanf("%d%*c", &acti);
while (acti != 1 && acti != 2 && acti != 3 && acti != 4 && acti != 5) while (acti <= 0 && acti >= 6)
{ {
printf("Veuillez entrer un nombre d'activité correct (badminton (1) | football (2) | zumba (3) | musculation (4) | squash (5))\n"); printf("Veuillez entrer un nombre d'activité correct (badminton (1) | football (2) | zumba (3) | musculation (4) | squash (5))\n");
scanf("%d%*c", &acti); scanf("%d%*c", &acti);
@ -394,7 +394,7 @@ void Loop(int *tAd, char tnom[][15], char tpnom[][15], int *tage, int *tstate, i
scanf("%*c%d", &nbacti); scanf("%*c%d", &nbacti);
} }
chxacti = ChoiceActi(nbacti, tacti); chxacti = ChoiceActi(nbacti, tacti);
CheckPts(tptsbonus, tptsbought, tpasseoupas, tacti, tcateg, place, chxacti, insuf); CheckPts(tptsbonus, tptsbought, tpasseoupas, tacti, tcateg, place, chxacti, insuf);
if (*insuf == 1) if (*insuf == 1)
{ {
@ -409,4 +409,4 @@ void Loop(int *tAd, char tnom[][15], char tpnom[][15], int *tage, int *tstate, i
*choix = ChoiceMenu(); *choix = ChoiceMenu();
} }
} }

Loading…
Cancel
Save