Dufam
This commit is contained in:
parent
98e27550b1
commit
37989b312b
@ -20,13 +20,7 @@ int main(){
|
||||
struct tree* root = NULL;
|
||||
root = read_tree();
|
||||
|
||||
char *buffer = calloc(SIZE,sizeof(char));
|
||||
int flag = get_input(buffer);
|
||||
if(flag==-1){
|
||||
puts("Expert z bufetu to vie.");
|
||||
puts("Chybna databaza");
|
||||
exit(0);
|
||||
}
|
||||
getchar();
|
||||
|
||||
puts("Expert z bufetu to vie.");
|
||||
printf("Pozna %d druhov ovocia a zeleniny.\n",type_count(root));
|
||||
@ -49,8 +43,7 @@ struct tree* read_tree(){
|
||||
|
||||
int flag = get_input(buffer);
|
||||
if(flag==-1){
|
||||
puts("Expert z bufetu to vie.");
|
||||
puts("Chybna databaza");
|
||||
puts("Koniec vstupu");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@ -96,6 +89,10 @@ void system_execute(struct tree* root){
|
||||
system_execute(root->left);
|
||||
}else if(resp[0]=='n'){
|
||||
system_execute(root->right);
|
||||
}else if(strlen(resp)>1){
|
||||
puts("Expert z bufetu to vie.");
|
||||
puts("Chybna databaza");
|
||||
exit(0);
|
||||
}else{
|
||||
puts("Nerozumiem");
|
||||
exit(0);
|
||||
|
Loading…
Reference in New Issue
Block a user