X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/db30ec34669e71266f038fcf7cb2386fa210d531..f8a441d3986f96851c8201fe82c5ce328b582d05:/emufs/b_test.c diff --git a/emufs/b_test.c b/emufs/b_test.c index 12d3809..4fd9c9d 100644 --- a/emufs/b_test.c +++ b/emufs/b_test.c @@ -1,21 +1,31 @@ #include "indice_b.h" +#include +#include int main(int argc, char *argv[]) { int pos; - b_crear(); + int c; - for(pos = 0; pos < 540; pos++) - b_insertar(65+pos, pos); + /*emufs_indice_b_crear(); - pos = b_buscar(70); + srand(time(NULL)); - if (pos == -1) - printf("No encontrado\n"); - else - printf("Esta en la pos %d\n", pos); + for(pos = 0; pos < 100; pos++) + b_insertar(pos, pos); + do { + printf("Numero a buscar (-1 para salir):\n"); + scanf("%d", &c); + fgetc(stdin); + pos = b_buscar(c); + if (pos == -1) + printf("No encontrado\n"); + else + printf("Esta en la pos %d\n", pos); + } while (c!=-1); +*/ return 0; }