zoukankan      html  css  js  c++  java
  • 冒泡排序 LZU

    namespace 冒泡排序
    {
        class Program
        {
            static void Main(string[] args)
            {
                int[] Array = {1,3,2,5,6,8,4,9,7,0 };
                int ArrLen = Array.Length,temp;
                for (int i = 0; i < ArrLen-1; i++)
                {
                    for (int j = 0; j < ArrLen - 1 - i; j++)
                    {
                        if (Array[j] > Array[j + 1])
                        {
                            temp = Array[j];
                            Array[j] = Array[j + 1];
                            Array[j + 1] = temp;
                        }
                    }
                }
                for (int i = 0; i < ArrLen; i++)
                {
                    Console.WriteLine(Array[i].ToString()+"\n");
                }
                Console.Write("按任意键退出...");
                Console.ReadKey(true);
            }
        }
    }
  • 相关阅读:
    配置并学习微信JS-SDK(1)
    在 Sublime Text 3 中运行 PHP
    apache-配置虚拟主机
    mysql-积累管理sql语句
    博客园-推荐发博客工具的安装配置
    注释多行文本
    nargin
    Sublime Text
    The MATLAB Profiler
    Fig723.asy
  • 原文地址:https://www.cnblogs.com/lzugis/p/6539941.html
Copyright © 2011-2022 走看看