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