added client menu with case

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

BIN
app

Binary file not shown.

@ -11,3 +11,20 @@ void affiche_client(){
printf("||\t1 : Afficher le récapitulatif du panier. \t \t || \n") ;
printf("-------------------------------------------------------------------\n");
}
/*
* Sert à lancer le menu et faire choisir l'utilisateur
*/
void menu(int *choix) {
affiche_client();
printf("Vous choisissez: ");
scanf("%d", choix);
while (*choix == 1)
{
affiche_client();
printf("Vous choisissez: ");
printf("Veuillez entrer un choix valide ! \n");
scanf("%d", choix);
}
}

@ -1,3 +1,4 @@
#include<stdio.h>
void affiche_client();
void menu(int *choix);

@ -5,7 +5,8 @@
#include "app/core_logic/client.h"
int main(){
int choix;
affiche_client();
menu(&choix);
afficherDonneesClient();
}

Loading…
Cancel
Save