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; struct tree* root = NULL;
root = read_tree(); 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."); puts("Expert z bufetu to vie.");
printf("Pozna %d druhov ovocia a zeleniny.\n",type_count(root)); printf("Pozna %d druhov ovocia a zeleniny.\n",type_count(root));
puts("Odpovedajte 'a' pre prvu moznost alebo 'n' pre druhu moznost."); 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); system_execute(root->left);
}else if(resp[0]=='n'){ }else if(resp[0]=='n'){
system_execute(root->right); system_execute(root->right);
}else if(strlen(resp)>1){
puts("Expert z bufetu to vie.");
puts("Chybna databaza");
exit(0);
}else{ }else{
puts("Nerozumiem"); puts("Nerozumiem");
exit(0); exit(0);