aa3
This commit is contained in:
parent
6d01152d94
commit
84c0fb78bf
11
a3/program.c
11
a3/program.c
@ -6,15 +6,12 @@ int main() {
|
|||||||
//int r = i * 2 + 2;
|
//int r = i * 2 + 2;
|
||||||
int i,j,n,count;
|
int i,j,n,count;
|
||||||
int *a = calloc(MAX, sizeof(int));
|
int *a = calloc(MAX, sizeof(int));
|
||||||
scanf("%d",n);
|
for(int i;i<MAX;i++){
|
||||||
while(n!=0){
|
scanf("%d",a[i]);
|
||||||
a[i]=n;
|
}
|
||||||
i++;
|
|
||||||
count++;
|
|
||||||
}
|
|
||||||
//m = buildmaxheap(a, n);
|
//m = buildmaxheap(a, n);
|
||||||
printf("Je to taka kopa:\n");
|
printf("Je to taka kopa:\n");
|
||||||
for (i = 0; i < count; i++) {
|
for (i = 0; i < MAX; i++) {
|
||||||
printf("%d\n", a[i]);
|
printf("%d\n", a[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user