Java Code:
Class class1
{
Static void bubblesort (int [] a)
{
For (int J = a.length - 1; j> 0; j--) // outr loop (INT i = 0; i
}
Public static void main (string [] args)
{
Int [] a = new int [] {- 1, -2, 9, 4, 5, 3, 7, 1, 2, 3, 1, 2, 3, -3, 2, -19};
// int [] a = new int in 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 11};
Bubblesort (a);
For (int i = 0; i { System.out.println (a [i]); } } } C # cote: Class class1 { Static void bubblesort (int [] a) { For (int J = a.length - 1; j> 0; j--) // outr loop (INT i = 0; i Static Void Swap (Ref Int X, Ref Int Y) { X = x y; Y = x - y; x = x - y; } Static void main (string [] args) { Int [] a = new int [] {- 1, -2, 9, 4, 5, 3, 7, 1, 2, 3, 1, 2, 3, -3, 2, -19}; // int [] a = new int in 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 11}; Bubblesort (a); For (int i = 0; i { System.console.writeLine (a [i]); } System.console.readline (); } }