From 9c211d289db0ac2f78ccc580233eb46120510a1c Mon Sep 17 00:00:00 2001 From: L0ol4X Date: Fri, 11 Nov 2022 10:12:59 +0100 Subject: [PATCH] voilaa --- sae.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sae.c b/sae.c index 7df43dc..9718a16 100644 --- a/sae.c +++ b/sae.c @@ -202,8 +202,8 @@ int Acti(int i) { int acti; printf("Choix de l'activité %d: badminton (1) | football (2) | zumba (3) | musculation (4) | squash (5) \n", i); - scanf("%*c%d", &acti); - while (acti != 1 && acti != 2 && acti != 3 && acti != 4 && acti != 5) + scanf("%d%*c", &acti); + while (acti <= 0 && acti >= 6) { printf("Veuillez entrer un nombre d'activité correct (badminton (1) | football (2) | zumba (3) | musculation (4) | squash (5))\n"); 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); } - chxacti = ChoiceActi(nbacti, tacti); + chxacti = ChoiceActi(nbacti, tacti); CheckPts(tptsbonus, tptsbought, tpasseoupas, tacti, tcateg, place, chxacti, insuf); if (*insuf == 1) { @@ -409,4 +409,4 @@ void Loop(int *tAd, char tnom[][15], char tpnom[][15], int *tage, int *tstate, i *choix = ChoiceMenu(); } -} \ No newline at end of file +}