Aktualizovat du5/program.c
This commit is contained in:
parent
f709f5b20e
commit
7ef209f6cc
@ -43,14 +43,7 @@ int buildATree()
|
|||||||
strcpy(tree[current].text, line + 1);
|
strcpy(tree[current].text, line + 1);
|
||||||
tree[current].yes = invalidIndex;
|
tree[current].yes = invalidIndex;
|
||||||
tree[current].no = invalidIndex;
|
tree[current].no = invalidIndex;
|
||||||
answerCount += 1;
|
//rekurzivne vytvorii dalsie 'nodes' (uzly po slovensky) na na zaklade vycitanych odpovedi z standard inputu
|
||||||
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
|
|
||||||
tree[current].yes = buildATree(); // 'a'
|
tree[current].yes = buildATree(); // 'a'
|
||||||
tree[current].no = buildATree(); // 'n'
|
tree[current].no = buildATree(); // 'n'
|
||||||
|
|
||||||
@ -130,4 +123,11 @@ int main()
|
|||||||
goThroughTheTree(root);
|
goThroughTheTree(root);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
} answerCount += 1;
|
||||||
|
return current;
|
||||||
|
}
|
||||||
|
|
||||||
|
tree[current].isAnswer = false;
|
||||||
|
strcpy(tree[current].text, line);
|
||||||
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user