예제 #1
0
        static void Main(string[] args)
        {
            int[]  input = { 4, 7, 13, 2, 3, 9, 5 };
            Bubble b     = new Bubble();

            b.Sort(input);
            foreach (int i in input)
            {
                Console.WriteLine(i);
            }
            Console.ReadKey();
        }
예제 #2
0
        private static void Main(string[] args)
        {
            Bubble bubble = new Bubble();

            List <int> list = new List <int>()
            {
                14,
                55,
                12,
                13,
                9,
                91,
                43,
                35,
                70,
                29,
                72,
                39,
                21,
                51,
                60,
                57,
                75,
                41,
                73,
                42,
                16,
                34,
                2,
                37,
                7,
                31,
                18,
                62,
                10,
                89,
                90,
                92,
                5,
                100,
                64,
                23,
                78,
                58,
                82,
                17,
                79,
                53,
                30,
                19,
                22,
                59,
                44,
                97,
                86,
                28,
                26,
                49,
                47,
                24,
                40,
                20,
                80,
                46,
                48,
                84,
                99,
                98,
                45,
                32,
                27,
                81,
                50,
                11,
                87,
                54,
                52,
                36,
                8,
                85,
                71,
                56,
                1,
                88,
                68,
                4,
                61,
                93,
                33,
                76,
                74,
                95,
                96,
                25,
                77,
                63,
                66,
                69,
                6,
                3,
                38,
                15,
                65,
                83,
                67,
                94
            };

            Console.WriteLine(string.Join(", ", list));
            bubble.Sort(list);

            Console.WriteLine(string.Join(", ", list));
        }