Initializacia

This commit is contained in:
Kozar 2024-11-10 16:16:10 +00:00
parent f256260aca
commit 9f4c372547

View File

@ -51,9 +51,11 @@ void run_tree(struct tree* tree) {
printf("%s\n", tree->value);
char response;
if (scanf(" %c", &response) != 1 || (response != 'a' && response != 'n')) {
error_flag = 1;
if (scanf(" %c", &response) != 1) {
printf("Chybna databaza\n");
return;
} else if (response != 'a' && response != 'n'){
printf("Nerozumiem\n");
}
if (response == 'a') {
@ -99,10 +101,6 @@ int main() {
run_tree(root);
if (error_flag) {
printf("Chybna databaza\n");
}
destroy_tree(root);
return 0;
}