From 7ef209f6ccd4f122a63d96c56f543a8c7960bac2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Vl=C4=8Dek?= Date: Wed, 15 Apr 2026 09:36:02 +0000 Subject: [PATCH] Aktualizovat du5/program.c --- du5/program.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/du5/program.c b/du5/program.c index e6c5e70..751fced 100644 --- a/du5/program.c +++ b/du5/program.c @@ -43,14 +43,7 @@ int buildATree() strcpy(tree[current].text, line + 1); tree[current].yes = invalidIndex; tree[current].no = invalidIndex; - answerCount += 1; - return current; - } - - tree[current].isAnswer = false; - strcpy(tree[current].text, line); - - //rekurzivne vytvorii dalsie 'nodes' (uzly po slovensky) na na zaklade vycitanych odpovedi z standard inputu + //rekurzivne vytvorii dalsie 'nodes' (uzly po slovensky) na na zaklade vycitanych odpovedi z standard inputu tree[current].yes = buildATree(); // 'a' tree[current].no = buildATree(); // 'n' @@ -130,4 +123,11 @@ int main() goThroughTheTree(root); return 0; -} \ No newline at end of file +} answerCount += 1; + return current; + } + + tree[current].isAnswer = false; + strcpy(tree[current].text, line); + + \ No newline at end of file