From 1322849aa3474bac4245b395a150810a97f5abae Mon Sep 17 00:00:00 2001 From: DahmaneYanis Date: Sun, 6 Nov 2022 00:45:54 +0100 Subject: [PATCH] =?UTF-8?q?Prise=20en=20compte=20du=20syst=C3=A8me=20d'exp?= =?UTF-8?q?loitation=20en=20cours?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adherent.c | 9 ++++++++- global.h | 10 ++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 global.h diff --git a/adherent.c b/adherent.c index 79c0691..f19728c 100644 --- a/adherent.c +++ b/adherent.c @@ -55,7 +55,14 @@ int SupprimerAdherent(int *nbAdherent, int tabNoCarte[], int tabEtatCarte[], int else { - + printf("Adherent trouve. Voici ses informations :\nNumero de carte : %d\nEtat de la carte : %d\nPoint(s) sur la carte : %d\nConfirmez vous la suppression de l'adherent (O/N) : ", tabNoCarte[indice], tabEtatCarte[indice], tabPointCarte[indice]); + + // Verification de la validité de la réponse + while (rep != 'N' && rep != 'O') + { + printf("Reponse incorrecte. Confirmez vous la suppression de l'adherent %d (O/N) : ", tabNoCarte[indice]); + scanf("%*c%c", &rep); + } // Suppression de l'adherent for (int i = indice; i < *nbAdherent ; i++) diff --git a/global.h b/global.h new file mode 100644 index 0000000..dd381f8 --- /dev/null +++ b/global.h @@ -0,0 +1,10 @@ +#include +#include + +#ifdef __linux__ +#define clean system("clear"); +#endif + +#ifdef _WIN32 +#define clean system("cls"); +#endif