resolved errors

Signed-off-by: Mathéo Hersan <matheohersan@MacBook-Pro-de-Matheo.local>
pull/3/head^2
Mathéo Hersan 2 years ago
parent a92406963b
commit 8263e70b97
No known key found for this signature in database
GPG Key ID: 4EF19C64D78EC91B

BIN
app

Binary file not shown.

@ -170,5 +170,4 @@ void affiche_recap_panier(int panier[], int taillePanier, int references[], floa
printf("Prix total à payer: %.2f euros\n", montantTotal);
printf("Volume utilise : %.2f litres\n", volumeTotal);
printf("Charge Actuelle: %.2f kg\n", poidsTotal);
}
}

@ -2,6 +2,7 @@
#include <stdlib.h>
#include "interface_resp.h"
#include "app/core_logic/responsable.h"
#include "app/core_logic/client.h"
#define MAX_CLIENTS 100
#define MAX_ARTICLES 100
@ -56,7 +57,7 @@ void affichUnArticle(int tRef[], float tPoids[], float tVol[], float tPrix[], in
{
int ref;
printf("\tQuelle est la référence de l'article à rechercher ?\n");
while(scanf("%d", &ref != 1 || ref <= 0))
while(scanf("%d", &ref != 1 || &ref <= 0))
{
printf("\tEntrez une référence valide\n");
while(getchar() != '\n');
@ -153,7 +154,7 @@ void affichSupprimerArticle(int *ref)
printf("\t Quel est la référence de l'article voulez-vous supprimez\n");
while(scanf("%d", ref == 1 || *ref <= 0))
{
printf("\t Veuillez entrer une référence valide.")
printf("\t Veuillez entrer une référence valide.");
while(getchar() != '\n');
}
}
@ -226,33 +227,37 @@ void global_resp(){
int tSus[MAX_CLIENTS];
int tLogArticle = chargementArticles(tRef, tPoids, tVol, tPrix, MAX_ARTICLES);
//int tLogClient = charger_clients(tNumClient, tCagnotte, tSus, MAX_CLIENTS);
int tLogClient = charger_clients(tNumClient, tCagnotte, tSus, MAX_CLIENTS);
menu_resp(&choix);
switch (choix) {
case 1:
affichArticles(tRef, tPoids, tVol, tPrix, tLogArticle);
break;
case 2:
affichUnArticle(tRef, tPoids, tVol, tPrix, tLogArticle);
break;
case 3:
affichUnClient(tNumClient, tCagnotte, tSus, tLogClient);
break;
case 4:
affichClients(tNumClient, tCagnotte, tSus, tLogClient);
break;
case 5:
modifierArticle(tRef, tPoids, tVol, tPrix, tLogArticle);
break;
case 6:
supprimerArticle(tRef, tPoids, tVol, tPrix, &tLogArticle);
break;
case 7:
printf("Ouai tkt ^^'");
break;
default:
printf("Veuillez entrer un choix valide ! \n");
break;
}
do {
menu_resp(&choix);
switch (choix) {
case 1:
affichArticles(tRef, tPoids, tVol, tPrix, tLogArticle);
break;
case 2:
affichUnArticle(tRef, tPoids, tVol, tPrix, tLogArticle);
break;
case 3:
affichUnClient(tNumClient, tCagnotte, tSus, tLogClient);
break;
case 4:
affichClients(tNumClient, tCagnotte, tSus, tLogClient);
break;
case 5:
modifierArticle(tRef, tPoids, tVol, tPrix, tLogArticle);
break;
case 6:
supprimerArticle(tRef, tPoids, tVol, tPrix, &tLogArticle);
break;
case 7:
printf("Ouai tkt ^^'");
break;
default:
printf("Veuillez entrer un choix valide ! \n");
break;
}
} while (choix != 7);
}

@ -1,10 +1,10 @@
void affichArticles( int tRef[], float tPoids[], float tVol[], float tPrix[], int tLogique);
void affichUnArticle(int tRef[], float tPoids[], float tVol[], float tPrix[], int tLogique, int val);
void affichUnArticle(int tRef[], float tPoids[], float tVol[], float tPrix[], int tLogique);
void affichUnClient(int tNumClient[], float tCagnotte[], int tSus[], int tLogique);
void affichClients(int tNumClient[], float tCagnotte[], int tSus[], int tLogique);
void affichAjoutArticle(int *ref, float *poids, float *volume, float *prix);
void affichSupprimerArticle(int *ref);
void affichModifierArticle(int *ref, float *poids, float *volume, float *prix);
void menu_resp(int *choix, int jour);
void menu_resp(int *choix);
void global_resp();
void affiche_resp(void);
Loading…
Cancel
Save