Write a program to sort elements of the array in this order. The even indexed elements should be in descending order and odd indexed elements must be in ascending order.

We are happy to help if you are stuck with a particular problem but we don't do homework. Please post what you have done so far and where you are having problems.

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.