Initializacia

This commit is contained in:
Kozar 2024-11-10 15:51:00 +00:00
parent a7794811d7
commit f9bc3d6d6e

View File

@ -49,10 +49,14 @@ void run_tree(struct tree* tree) {
printf("%s\n", tree->value); printf("%s\n", tree->value);
char response; char response;
if (scanf(" %c", &response) != 1 || (response != 'a' && response != 'n')) { if (scanf(" %c", &response) != 1) {
printf("Koniec vstupu\n");
return;
if else(response != 'a' && response != 'n'){
printf("Nerozumiem\n"); printf("Nerozumiem\n");
return; return;
} }
}
if (response == 'a') { if (response == 'a') {
run_tree(tree->left); run_tree(tree->left);