From 80a7c227a0675ebf9bc9d3f2cd0aa7e7e8b58275 Mon Sep 17 00:00:00 2001 From: Radovan Kofira Date: Tue, 24 Nov 2020 22:16:29 +0100 Subject: [PATCH] a3 --- a3/program.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/a3/program.c b/a3/program.c index e4e01ce..babaa4e 100644 --- a/a3/program.c +++ b/a3/program.c @@ -1,6 +1,7 @@ #include #include #define MAX 20 + struct node { int data; struct node* left; @@ -19,7 +20,7 @@ struct node* root; int i,n; int *a = calloc(MAX, sizeof(int)); for (i = 0; i < MAX; i++) { - scanf("%d", &root->data); + scanf("%d", root->data); if(a[i]!=0){ n++; }