Corrections exos
This commit is contained in:
parent
5b66e31981
commit
c1e001cd10
@ -31,5 +31,4 @@ int main(int argc, char * argv[]) {
|
||||
}
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user