a3
This commit is contained in:
parent
1fc83d9839
commit
80a7c227a0
@ -1,6 +1,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#define MAX 20
|
#define MAX 20
|
||||||
|
|
||||||
struct node {
|
struct node {
|
||||||
int data;
|
int data;
|
||||||
struct node* left;
|
struct node* left;
|
||||||
@ -19,7 +20,7 @@ struct node* root;
|
|||||||
int i,n;
|
int i,n;
|
||||||
int *a = calloc(MAX, sizeof(int));
|
int *a = calloc(MAX, sizeof(int));
|
||||||
for (i = 0; i < MAX; i++) {
|
for (i = 0; i < MAX; i++) {
|
||||||
scanf("%d", &root->data);
|
scanf("%d", root->data);
|
||||||
if(a[i]!=0){
|
if(a[i]!=0){
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user