but for 2 you only need 1 if statement, correct?
now, do you understand how bubble sort works not just how to code it? have you made a little list on paper, with (say) 4 items and done some iterations to see how the numbers change?
bubble sort normally decreases the loop count by 1 each iteration, but it still works fine if you always loop 1..N as long as you figure out when to stop. Try this on paper too.
Or just turn in the billion if statement version I guess, but you'll be passing up a chance to work on your problem-solving, which you'll really need if you ever want (or need) to do any programming outside of classes.