diff --git a/APL1.1/CMB1/distribution.c b/APL1.1/CMB1/distribution.c index 431b5c0..fec15b0 100644 --- a/APL1.1/CMB1/distribution.c +++ b/APL1.1/CMB1/distribution.c @@ -31,5 +31,4 @@ int main(int argc, char * argv[]) { } return EXIT_SUCCESS; -} - +} \ No newline at end of file diff --git a/APL1.1/TP15/decoupage.c b/APL1.1/TP15/decoupage.c index 721fd72..15a13b7 100644 --- a/APL1.1/TP15/decoupage.c +++ b/APL1.1/TP15/decoupage.c @@ -25,16 +25,21 @@ int showMenu() { puts("Que voulez vous dessiner ?"); puts("1. Carré"); puts("2. Triangle"); + puts("3. Quitter"); scanf("%d", &choice); return choice; } int main(int argc, char * argv[]) { - int choice = showMenu(); + int choice; + do { + choice = showMenu(); + if (choice == 1) drawSquare(); + else if (choice == 2) drawTriangle(); + else if (choice != 3) puts("Choix incorrect."); + } while (choice != 3); - if(choice == 1) drawSquare(); - else drawTriangle(); return EXIT_SUCCESS; }