将一个int数组向左平移一次

            int[] numbs = { 1,2,3,4,5};
            int temp = numbs[0];
            for (int i = 0; i < numbs.Length-1; i++)
            {
               numbs[i] = numbs[i + 1];
            }
            numbs[numbs.Length - 1] = temp;
            foreach (int item in numbs)
            {
                Console.Write(item+",");
            }

posted @ 2013-02-28 20:05  姚志超  阅读(231)  评论(0编辑  收藏  举报