Supprimer Exo-2/main.c
This commit is contained in:
parent
050c53f12d
commit
8c235882a7
44
Exo-2/main.c
44
Exo-2/main.c
@ -1,44 +0,0 @@
|
|||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
void ajouterContact();
|
|
||||||
void afficherContacts();
|
|
||||||
|
|
||||||
int main() {
|
|
||||||
int choix = 0;
|
|
||||||
|
|
||||||
do {
|
|
||||||
// Affichage du menu
|
|
||||||
printf("\n--- Gestionnaire de contacts ---\n");
|
|
||||||
printf("1. Ajouter un contact\n");
|
|
||||||
printf("2. Afficher tous les contacts\n");
|
|
||||||
printf("3. Quitter\n");
|
|
||||||
printf("Votre choix : ");
|
|
||||||
scanf("%d", &choix);
|
|
||||||
getchar(); // Pour absorber le retour à la ligne
|
|
||||||
|
|
||||||
switch (choix) {
|
|
||||||
case 1:
|
|
||||||
ajouterContact();
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
afficherContacts();
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
printf("Au revoir!\n");
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
printf("Choix invalide!\n");
|
|
||||||
}
|
|
||||||
} while (choix != 3);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ajouterContact() {
|
|
||||||
// À compléter
|
|
||||||
}
|
|
||||||
|
|
||||||
void afficherContacts() {
|
|
||||||
// À compléter
|
|
||||||
}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user