Page 579 - Computer science 868 Class 12
P. 579

79      System.out.print(ar[i]+"|");
                   80              }

                   81          }
                   82      }
                   83      public static void main()

                   84         {

                   85             Scanner sc= new Scanner(System.in);
                   86             Mid_Sort ob = new Mid_Sort();
                   87             System.out.print("Please Enter Array Size: ");

                   88             int s=sc.nextInt();
                   89             ob.input(s);

                   90             System.out.print("The Elements of the Array are: ");
                   91             ob.display();

                   92             ob.sort();
                   93             System.out.print("\nThe Elements of the Sorted Array are: ");

                   94             ob.display();
                   95      }

                 Output of the preceding program is as follows:

                 Please Enter Array Size: 5
                 Enter the element of the array: 32

                 995
                 2361

                 214
                 35
                 The Elements of the Array are:

                 32|995|2361|214|35|
                 The Elements of the Sorted Array are:
                 32|214|2361|995|35|




















                                                                                                                       577
                                                                                                   Internal Assessment  577
   574   575   576   577   578   579   580   581   582   583   584