This commit is contained in:
Maksym Malko 2020-11-27 13:07:00 +01:00
parent 1cdfa72962
commit 3b1118614f
2 changed files with 10 additions and 6 deletions

BIN
cv8/a.out

Binary file not shown.

View File

@ -20,8 +20,16 @@ int main(){
struct tree* root = NULL;
root = read_tree();
getchar();
char resp[SIZE];
memset(resp,0,SIZE);
get_input(resp);
if(strlen(resp)>1){
puts("Expert z bufetu to vie.");
puts("Chybna databaza");
exit(0);
}
puts("Expert z bufetu to vie.");
printf("Pozna %d druhov ovocia a zeleniny.\n",type_count(root));
puts("Odpovedajte 'a' pre prvu moznost alebo 'n' pre druhu moznost.");
@ -90,10 +98,6 @@ 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);