how to input n numbers and print it in ascending order without using array
<p>I was trying to create a program that takes <code>n</code> number of input in a loop and capable of showing output in ascending order. The main theme of program is <strong>it should not use</strong> arrays.</p>

<p>I tried it by creating a program that takes input and shows smallest number first then 2nd smallest and 3rd smallest and so on. But I am new to programming so my program could do only like 1st smallest and it does not work.
<br>
<br>
I also saw heap data structure in one of the similar questions but couldn't figure out how it can work without arrays.</p>

<p>Please help me how can we use heap data structure or give me a good suggestion to do it.</p>