diff --git a/cv7/program.c b/cv7/program.c index 4521557..5f06f21 100644 --- a/cv7/program.c +++ b/cv7/program.c @@ -54,11 +54,16 @@ void run_tree(struct tree* tree) { if (scanf(" %c", &response) != 1) { printf("Koniec vstupu\n"); return; - } else if (response != 'a' && response != 'n'){ - printf("Nerozumiem\n"); + }else if (response != 'a' && response != 'n') { + if (feof(stdin)) { + printf("Chybna databaza\n"); + } else { + printf("Nerozumiem\n"); + } return; } + if (response == 'a') { run_tree(tree->left); } else {