Documente Academic
Documente Profesional
Documente Cultură
import java.util.Scanner;
/**
*
* @author LENOVO
*/
public class mager {
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
/**
*
* @author LENOVO
*/
int n;
int[] num;
boolean run=true;
String pilih;
void getNumbers(){
System.out.println("\tMerge Sort");
System.out.println("___________________________________________");
System.out.println("\nKlik enter 'n' masukkan nilai :");
n = Integer.parseInt(melbu.nextLine());
System.out.println("Masukkan angka:");
num = new int[n];
num[i] = Integer.parseInt(melbu.nextLine());
}
System.out.println("\nSebelum disortir");
MergeSort(num, 0, n-1);
System.out.println("\n\nSetelah disortir");
System.out.println("\nAscending Output");
for(int i=0; i<n; i++) {
System.out.println("\nDescending Output");
int low = i;
int high = j;
return;
}
low++;
}
else {
num[k+1] = num[k];
}
num[low] = Temp;
low ++;
end_low ++;
start_high ++;
}
obj.getNumbers();