This commit is contained in:
Oleksandr Hryshchenko 2021-11-26 01:09:14 +00:00
parent 64fa62b6ea
commit 435889c0bb

View File

@ -47,6 +47,9 @@ struct binary* itemAppend(struct binary* myTree, char* item){
if(!myTree || ((myTree->right != NULL && myTree->left != NULL) && (myTree->left->value[0] == '*' && myTree->right->value[0] == '*')))
return NULL;
if(!strcmp(item, "Je to zelene?"))
printf("ti");
struct binary* itrNode = myTree;
while(itrNode->left != NULL){
if(itrNode->left->value[0] != '*')
@ -97,15 +100,14 @@ int main() {
if(usrIn[0] == '*')
inputsAmount++;
if(strlen(usrIn) > 1)
if(!itemAppend(itrNode, usrIn))
inputsAmount = -200;
itemAppend(itrNode, usrIn);
endingFound = false;
}
}
printf("Expert z bufetu to vie.\n");
if(inputsAmount <= 0){
if(inputsAmount == 0){
printf("Chybna databaza\n");
return 0;
}