Well...no.
This is your homework, and that means you are supposed to test it yourself.
It's important: it's a big part of the developement cycle:
0) Design
1) Code
2) Test
3) Debug
At any stage, you can go back to an earlier one as a result.
The last two are interrelated to a fair degree, and are often the most time consuming part of the exercise.
So, come up with some sets of test data:
Random values
All the same value
1 value
2 different values
All sorted correctly
All in reverse order
All correct except the last one, which is the lowest.
All correct except the first one, which is the highest
And try it with each set. Does it produce the right output? If so, it passes (unless you can think of more test sets).
If not - time to start looking at the code with the debugger and examine exactly what is happening!
Yes, we could do that for you - but this is a skill. And like all skills you only develop it by using it - and it's a lot easier to develop it on trivial exercises like this than on a 100,000 line application! :laugh:
Give it a try: see what you can find out.