import java.util.
Scanner;
public class Array {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int a[] = new int[10];
int i,j;
System.out.println("Enter the elements of the array:");
for ( i = 0; i < n; i++) {
a[i] = sc.nextInt();
//Bubble Sort
for ( i = 0; i < n ; i++) {
for ( j = i+1 ; j < n; j++) {
if (a[i] > a[j]) {
int t = a[i];
a[i] = a[j];
a[j] = t;
System.out.println("Sorted Array:");
for ( i = 0; i < n; i++) {
System.out.print(a[i] + " ");
}
}