Hi,
I find it hard to believe that you would be given the tasks of iterating over and manipulating arrays like this without covering them in some way first in your coursework / training material.
Iterating over and working with arrays and other multi-valued data structures are a core aspect that you must grasp if you are going to proceed with any kind of programming so I suggest you take a look at the wealth of array documentation available on the internet.
Bubble sort algorthms are well documented, too. It will require that you learn how to iterate over and manipulate arrays, as mentioned.
Gaz