cv7
This commit is contained in:
parent
6309830a5c
commit
7e9817f094
@ -15,6 +15,7 @@ struct tree* read_tree(int* counter) {
|
|||||||
memset(buffer, 0, SIZE);
|
memset(buffer, 0, SIZE);
|
||||||
char* r = fgets(buffer, SIZE, stdin);
|
char* r = fgets(buffer, SIZE, stdin);
|
||||||
if(r == NULL){
|
if(r == NULL){
|
||||||
|
printf("Expert z bufetu to vie.\n");
|
||||||
printf("Chybna databaza\n");
|
printf("Chybna databaza\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -65,11 +66,12 @@ void print_tree(struct tree* tree) {
|
|||||||
int main() {
|
int main() {
|
||||||
int counter = 0;
|
int counter = 0;
|
||||||
struct tree* root = read_tree(&counter);
|
struct tree* root = read_tree(&counter);
|
||||||
printf("Expert z bufetu to vie.\n");
|
if(root != 0){
|
||||||
|
printf("Expert z bufetu to vie.\n");
|
||||||
printf("Pozna %d druhov ovocia a zeleniny.\n", counter);
|
printf("Pozna %d druhov ovocia a zeleniny.\n", counter);
|
||||||
printf("Odpovedajte 'a' pre prvu moznost alebo 'n' pre druhu moznost.\n");
|
printf("Odpovedajte 'a' pre prvu moznost alebo 'n' pre druhu moznost.\n");
|
||||||
print_tree(root);
|
print_tree(root);
|
||||||
|
}
|
||||||
destroy_tree(root);
|
destroy_tree(root);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user