diff --git a/examples/tri_selection/tri.c b/examples/tri_selection/tri.c index e1feebbaba3c57d564f4df4da5125c2888b19e9a..9e5811c5e8fbe7888b1e9f9254a5fc36c9f40fdc 100644 --- a/examples/tri_selection/tri.c +++ b/examples/tri_selection/tri.c @@ -35,4 +35,12 @@ int main() { printf("%f ", tab[i]); } printf("\n"); + + for (int i = 0; i < SIZE - 1; ++i) { + if (tab[i] > tab[i + 1]) { + return EXIT_FAILURE; + } + } + + return EXIT_SUCCESS; }