using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            int i,j,n,temp;
            int [] A= {9,8,7,6,5,4,3,2,1,0};
           
            for (i = 0; i < 10; i++)
            {
                for (j=1;j<10;j++)
                {
                    if (A[j - 1] > A[j])
                    {
                        temp = A[j - 1];
                        A[j - 1] = A[j];
                        A[j] = temp;
                    }
                    for (n = 0; n < 10; n++)
                    System.Console.Write(A[n]);
                    System.Console.WriteLine();
                }

            }
            System.Console.WriteLine();
            for (i = 0; i < 10; i++)
                System.Console.Write(A[i]);
                System.Console.WriteLine();
            Console.Read();           
        }
    }
}



arrow
arrow
    全站熱搜

    Joy 發表在 痞客邦 留言(1) 人氣()