Nice code for bubble sort technique... Just one more thing... Make it a bit advanced by keeping a check after every cycle so that, after the array is sorted, the loop doesnt run...
For example if this is the array :
Quote:
10 9 100 200 300 400
After the first check, the array becomes :
Quote:
9 10 100 200 300 400
Which does not need running the loop any further...

But, in your code, the loop runs further... Increasing the complexity of the program and making the code slower...

This is just an advice... But your code is well implemented...