From 00dee87482ffebb6ca6c4dbbd3a175c12b8fffff Mon Sep 17 00:00:00 2001 From: "louis.germain" Date: Tue, 17 Oct 2023 11:23:49 +0200 Subject: [PATCH] =?UTF-8?q?Ajout=20des=20fonctions=20d'affichage=20et=20mo?= =?UTF-8?q?dification=20=C3=A0=20vide=20de=20la=20modif=20des=20clients?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/display.c | 49 ++++++++++++++++++++++++++++++++++ src/main.c | 68 +++--------------------------------------------- src/main.h | 11 +++++++- src/traitement.c | 17 ++++++++++-- 4 files changed, 78 insertions(+), 67 deletions(-) create mode 100644 src/display.c diff --git a/src/display.c b/src/display.c new file mode 100644 index 0000000..550540d --- /dev/null +++ b/src/display.c @@ -0,0 +1,49 @@ +#include "main.h" + +void displayItem(int reference[], float weight[], float volume[], float unitPrice[], int tlog) +{ + int reference, index; + printf("Entrez la référence de l'article cherché: "); + scanf("%d", &reference); + index = recherche(reference, reference[], tlog); + if (index == -1) + { + printf("La référence cherchée n'existe pas"); + exit(1); + } + printf("%d\t%f\t%f\t%f", reference[index], weight[index], volume[index], unitPrice[index]); +} + +void displayItemList(int reference[], float weight[], float volume[], float unitPrice[], int tlog) +{ + int i; + printf("reference\tpoids\tvolume\tprix"); + for (i=0; i