Nowhere are you actually sorting the numbers, which are stored in a[].
What is the purpose of lines 19-22? It simply asks for the user to input a number and then
creates an array with that many (uninitialized) elements. Then lines 25-27 output the
uninitialized array.
i recreated the program. now my issue is how to sort the numbers. considering that they are sorted in a[], should i create subprograms that has parameters to make this happen? or is there a simpler way to do so?
my current program looks similar, but just deleted things here and there...
all you have to do is to search on google for sorting alghoritms - you will find a whole bunch of various alghoritms including examples. It's worth to look through them all, to learn something about complexity, which may be helpful in the (near) future
Greets
JK