repositories
/
TD_C.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TP_13 exo2: Finish the implementation of a basic tic-tac-toe game.
[TD_C.git]
/
TP_13
/
exo1
/
src
/
main.c
diff --git
a/TP_13/exo1/src/main.c
b/TP_13/exo1/src/main.c
index 2c81a631b28d3abb19c28c4eb6bf4d0ce3e0bd7f..ef4d5455c32177aba07a6eff8f7af458d9931fd1 100644
(file)
--- a/
TP_13/exo1/src/main.c
+++ b/
TP_13/exo1/src/main.c
@@
-18,8
+18,8
@@
int main() {
display_choice_menu();
errno = prompt_value("Choix?", &choice);
handle_prompt_error(errno);
display_choice_menu();
errno = prompt_value("Choix?", &choice);
handle_prompt_error(errno);
- if (1 > choice ||
7
< choice) {
- printf("\nFaire un choix compris entre 1 et
7
\n");
+ if (1 > choice ||
8
< choice) {
+ printf("\nFaire un choix compris entre 1 et
8
\n");
continue;
}
switch (choice) {
continue;
}
switch (choice) {
@@
-41,11
+41,14
@@
int main() {
case 6:
printf("\nLe nombre d'entiers impairs dans le tableau est %d\n", count_tab_criteria(tab, tab_size, is_odd));
break;
case 6:
printf("\nLe nombre d'entiers impairs dans le tableau est %d\n", count_tab_criteria(tab, tab_size, is_odd));
break;
+ case 7:
+ do_resize(tab, &tab_size);
+ break;
default:
/* do nothing, unused code path */
break;
}
default:
/* do nothing, unused code path */
break;
}
- } while (choice !=
7
);
+ } while (choice !=
8
);
free_tab(tab);
exit(EXIT_SUCCESS);
free_tab(tab);
exit(EXIT_SUCCESS);