Well, a simple logic for u is that
1. maintain loop which will run until a condition occurs ( that condition i will tell u a bit later)
2. now in that while loop read the first two number, if the 2nd one is greater than one than swap both number and place in the array again, do the same for 2nd and 3rd elements, and continue doing it until the end of the array.
3. The array will not be sorted on first iteration, we have to continue swapping the elements of array till it will have been sorted in descending order
4. Now lets talk about the condition of while loop, take a variable, and the value of this variable resets to 0 with the start of while loop, and the value of that variable, say x, gets incremented when there is a swapping occur in the whole list. So your while loop will stop if the value of variable x is 0 at the end of any iteration.
This is a slow and time taking algorithm, but its easy to understand. I will provide u the code if u need :)