du6.4
This commit is contained in:
parent
17a0dc06c6
commit
08b5e7eba8
@ -45,7 +45,11 @@ int count(Node *x) {
|
||||
|
||||
// funkcia pre spustenie chatbota
|
||||
void run(Node *x) {
|
||||
if (!x) return; // prázdny uzol - nič nerobíme
|
||||
if (!x) { // ak je uzol prázdny
|
||||
printf("Koniec vstupu\n"); // vypíšeme koniec vstupu
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (x->leaf) { // ak sme na liste (odpoveď)
|
||||
printf("*%s\nKoniec\n", x->t); // vypíšeme odpoveď a koniec
|
||||
|
||||
Loading…
Reference in New Issue
Block a user