Exemplo n.º 1
0
        static void Main(string[] args)
        {
            DaySo ds = new DaySo();


            DaySo[] dsArray = new DaySo[ds.getElement()];
            int[]   array   = ds.Nhap(dsArray);
            ds.Sort(array);
        }
Exemplo n.º 2
0
        public int[] getSequence()
        {
            DaySo ds = new DaySo();

            DaySo[] arr = null;
            ds.Nhap(arr);
            int[] array = new int[arr.Length];
            for (int i = 0; i < array.Length; i++)
            {
                array[i] = arr[i].getNumber();
            }
            return(array);
        }
Exemplo n.º 3
0
 public int[] Nhap(DaySo[] ds)
 {
     Console.WriteLine("So phan tu trong day so: ");
     element     = Convert.ToInt32(Console.ReadLine());
     ds          = new DaySo[element];
     numberArray = new int[element];
     for (int i = 0; i < element; i++)
     {
         Console.WriteLine("Vui long nhap day so: ");
         numberArray[i] = Convert.ToInt32(Console.ReadLine());
         ds[i]          = new DaySo(numberArray[i], numberArray, element);
     }
     return(numberArray);
 }