using an array as a subroutine, then checking if its in ascending order then finding the median

This sounds like an assignment and not a discussion. In most forums you show your work and point out where you have an issue so folk can weigh in on what could be amiss. If you want to put up a job for hire, you do that.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.