Inputing intergers heap

So i have this assignment where i need to input heap integers and when i print the code out,, it goes from highest to lowest.

So when I go like

1
2
3
4
5
>new a = 10 20 30 44 65
>print a
65 44 30 20 10
>top a
65


I do have a base code but its like a c++ compile and run.. you type in the the elements size like

1
2
3
4
5
6
Enter heap size - 5
10
20
30
44
65



and right after this it prints the highest to lowest.

So any help here??

Heres the image as to how its actually supposed to come out https://www.dropbox.com/s/mrddjrkbc54ytyu/rsz_screenshot_101.png?dl=0

And heres the image as to how i get
https://www.dropbox.com/s/zr5ktrs6bgqfa1y/rsz_screenshot_102.png?dl=0
Topic archived. No new replies allowed.