Hi, I've been working on this program and I don't get the right results for some odd reason. I want "all" of the following numbers to be in descending order.
Here's the code, I do get the first three values in the list but none of the other numbers display. I want all the number to display in descending order. Where am I going wrong? Thank you for the help.
void Print_descending(const int list, int length)
cout << "The numbers in descending order: ";
max = list;
for (index = 0; index < length; index++)
while (list[index] > max)
max = list[index];
cout << max << endl;