a
This commit is contained in:
27
APL1.1/organisation_code/source/exo1/main.c
Normal file
27
APL1.1/organisation_code/source/exo1/main.c
Normal file
@@ -0,0 +1,27 @@
|
||||
/* TP19 Exercice 1 : fichier main.c */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include "personne.h"
|
||||
#include "repertoire.h"
|
||||
#include "option.h"
|
||||
|
||||
|
||||
|
||||
int main(void) {
|
||||
options opt;
|
||||
repertoire r = construire_repertoire();
|
||||
while ((opt=saisir_option())!=SORTIR)
|
||||
switch(opt) {
|
||||
case AJOUTER :
|
||||
ajouter_personne(r, saisir_personne());
|
||||
break;
|
||||
case AFFICHER :
|
||||
afficher_repertoire(r);
|
||||
break;
|
||||
default :
|
||||
; /* rien a faire */
|
||||
}
|
||||
detruire_repertoire(r);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
Reference in New Issue
Block a user