parent
2e737c5731
commit
00dee87482
@ -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<tlog; i++)
|
||||||
|
{
|
||||||
|
printf("%d\t%f\t%f\t%f", reference[i], weight[i], volume[i], unitPrice[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void displayClient(int clientID[], float cagnotte[], int suspended[], int tlog)
|
||||||
|
{
|
||||||
|
int id, index;
|
||||||
|
printf("Entrez le numéro du client cherché: ");
|
||||||
|
scanf("%d", &id);
|
||||||
|
index = recherche(id, clientID, tlog);
|
||||||
|
if (index == -1)
|
||||||
|
{
|
||||||
|
printf("Le client cherché n'existe pas");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
printf("%d\t%f\t%d", clientID[index], cagnotte[index], suspended[index]);
|
||||||
|
}
|
||||||
|
|
||||||
|
void displayClientList(int clientID[], float cagnotte[], int suspended[], int tlog)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
printf("num Client\tcagnotte\tsuspended");
|
||||||
|
for (i=0; i<tlog; i++)
|
||||||
|
{
|
||||||
|
printf("%d\t%f\t%d", clientID[i], cagnotte[i], suspended[i]);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue