c#的 问题! 麻烦大神看看哪里出错了!

 int[] a ={1,2,3,4,5,6,7,8,9,10};
            int aa;

                  //使用冒泡对数组进行降序排序
            for (int i = 0; i < a.Length; i++)
            {
                for (int j = 0; j < a.Length-i-1; j++)
                {
                    if (a[j] < a[j + 1])
                    {
                        aa = a[j];
                        a[j] = a[j + 1];
                        a[j + 1] = aa;
                    }                 
                }
                Console.Write(a[i] + "\t"); 
            }


LEATH
浏览 560回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP