added all the verifications

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

BIN
app

Binary file not shown.

@ -195,7 +195,7 @@ void modifier_quantite_article_panier(int panier[], int quantites[], int *taille
while (getchar() != '\n');
printf("ERREUR : Veuillez entrer une référence valide (nombre) : ");
}
while (getchar() != '\n'); // Nettoyer le tampon d'entrée
while (getchar() != '\n');
int articleIndex = -1;
for (int i = 0; i < *taillePanier; i++) {
@ -225,4 +225,4 @@ void modifier_quantite_article_panier(int panier[], int quantites[], int *taille
void reinitialiser_panier(int panier[], int quantites[], int *taillePanier) {
*taillePanier = 0;
printf("Panier réinitialisé avec succès.\n");
}
}

@ -5,7 +5,7 @@
#define MAX_ARTICLES 100
#define MAX_CLIENTS 100
void affiche_client(int a) {
void affiche_client() {
printf("\n");
printf("+-------------+ \n");
printf("|| Bonjour ! ||\n");
@ -25,8 +25,8 @@ void affiche_client(int a) {
/*
* Sert à lancer le menu et faire choisir l'utilisateur
*/
void menu_client(int *choix, int jour) {
affiche_client(jour);
void menu_client(int *choix) {
affiche_client();
printf("Vous choisissez: ");
while (scanf("%d", choix) != 1 || *choix < 0 || *choix > 9) {
while (getchar() != '\n');
@ -90,7 +90,7 @@ void global_client() {
}
do{
menu_client(&choix, jour);
menu_client(&choix);
switch (choix) {
case 1:

@ -1,5 +1,5 @@
#include<stdio.h>
void affiche_client(int a);
void menu_client(int *choix, int a);
void affiche_client();
void menu_client(int *choix);
void global_client();
Loading…
Cancel
Save