#include #include #include "dichotomie.h" static void resultat(int); int liste[] = { 0, 2, 4, 6, 8, 10 }; static const int debut = 1; static const int fin = (sizeof liste / sizeof liste[0]) - 1; int main(void) { resultat(1); resultat(6); resultat(7); resultat(10); resultat(11); return EXIT_SUCCESS; } static void resultat(int n) { printf("%3d -> %3d\n", n, recherche(debut, fin, liste, n)); }