2015年11月13日 星期五

C8_4 Test.cs

using System;
namespace C8_4
{
    public class Test
    {
        public static void Main(string[] args)
        {
            Double[] arr = { 1.4,1,3,4,5,9.3,5.5,1.1};
            string array = "";
            for (int i = 0; i < arr.Length - 1; i++)
            {
                array += arr[i] + ",";

            }
            array += arr[arr.Length - 1];
            DoublebSort dsort = new DoublebSort();
            Console.WriteLine("用泡沫演算法對雙精準度浮點數據({0})進行排序如下:",array);
            dsort.StartSort(arr);
            for (int j = 0; j < arr.Length; j++)
            {
                Console.WriteLine("{0}",arr[j]);
            }
        }
    }
}

沒有留言: