Update cv7/program.c
This commit is contained in:
parent
f7d61b0bbf
commit
10adb704e4
@ -4,6 +4,7 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
||||||
#define SIZE 200
|
#define SIZE 200
|
||||||
|
|
||||||
struct tree
|
struct tree
|
||||||
@ -80,12 +81,15 @@ void destroy_tree(struct tree* tree){
|
|||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
struct tree *tr=NULL;
|
struct tree *tr=NULL;
|
||||||
|
char rrrr[333];
|
||||||
|
|
||||||
|
|
||||||
tr=read_tree();
|
tr=read_tree();
|
||||||
printf("Expert z bufetu to vie.\n");
|
printf("Expert z bufetu to vie.\n");
|
||||||
if(tr==NULL)
|
fgets(rrrr, 333, stdin);
|
||||||
|
|
||||||
|
if(tr==NULL||rrrr[0]!='\n')
|
||||||
{
|
{
|
||||||
printf("Chybna databaza\n");
|
printf("Chybna databaza\n");
|
||||||
return 0;
|
return 0;
|
||||||
@ -95,7 +99,6 @@ int main(void)
|
|||||||
|
|
||||||
kk=kkk(tr,0);
|
kk=kkk(tr,0);
|
||||||
|
|
||||||
|
|
||||||
printf("Pozna %d druhov ovocia a zeleniny.\n", kk);
|
printf("Pozna %d druhov ovocia a zeleniny.\n", kk);
|
||||||
|
|
||||||
struct tree *p=tr;
|
struct tree *p=tr;
|
||||||
|
Loading…
Reference in New Issue
Block a user