cv8
This commit is contained in:
parent
64fa62b6ea
commit
435889c0bb
@ -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] == '*')))
|
if(!myTree || ((myTree->right != NULL && myTree->left != NULL) && (myTree->left->value[0] == '*' && myTree->right->value[0] == '*')))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
if(!strcmp(item, "Je to zelene?"))
|
||||||
|
printf("ti");
|
||||||
|
|
||||||
struct binary* itrNode = myTree;
|
struct binary* itrNode = myTree;
|
||||||
while(itrNode->left != NULL){
|
while(itrNode->left != NULL){
|
||||||
if(itrNode->left->value[0] != '*')
|
if(itrNode->left->value[0] != '*')
|
||||||
@ -97,15 +100,14 @@ int main() {
|
|||||||
if(usrIn[0] == '*')
|
if(usrIn[0] == '*')
|
||||||
inputsAmount++;
|
inputsAmount++;
|
||||||
if(strlen(usrIn) > 1)
|
if(strlen(usrIn) > 1)
|
||||||
if(!itemAppend(itrNode, usrIn))
|
itemAppend(itrNode, usrIn);
|
||||||
inputsAmount = -200;
|
|
||||||
endingFound = false;
|
endingFound = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Expert z bufetu to vie.\n");
|
printf("Expert z bufetu to vie.\n");
|
||||||
|
|
||||||
if(inputsAmount <= 0){
|
if(inputsAmount == 0){
|
||||||
printf("Chybna databaza\n");
|
printf("Chybna databaza\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user