登录
首页 » 算法 » 冒泡法 起泡法 用使数组排列

冒泡法 起泡法 用使数组排列

于 2023-04-24 发布 文件大小:209.26 kB
0 183
下载积分: 2 下载次数: 1

代码说明:

C语言冒泡法(起泡法)排序 思路:将相邻的两个数进行比较,将小的调到前头。 如果有n个数,那么要进行n-1次的比较。在第一次比较中要进行n-1次的两两比较,在第j次比较中要进行n-j次的两两比较。 过程:先通过动态赋值的方法,把用户输入的10个数字保存到数组中。 用两个for循环语句,外层循环是限制次数,内层循环限制某次要进行两两比较的次数。 如果a[n]>a[n+1],那么将两个数进行交换。

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 几何C++
    很好的关于几何计算的算法,很值得保留
    2022-01-22 08:02:18下载
    积分:1
  • sift
    这是基于MFC的sift算法,在VC上运行通过,代码注释比较详细,分块比较清晰,通过按键可以生成高斯金字塔,差分金字塔特征点和方向,已经特征点的文档
    2022-04-19 07:31:01下载
    积分:1
  • An exapmle of mathmatica
    An exapmle of mathmatica
    2022-05-24 17:16:27下载
    积分:1
  • lisp utility lib
    CLLIB is a varied collection of Common lisp tools and routines in CLOCC. Includes:  â–  "guess the animal" game; simple neural net (AI)  â–  autoload function and snarfing autoloads from other files  â–  basic definitions: package and path  â–  base64 encoding and decoding (data format)  â–  Rolodex: BBDB/vCard handling  â–  check values and types of the elements of a list  â–  Common Lisp HyperSpec access  â–  read/write CLOS object
    2022-02-01 20:05:38下载
    积分:1
  • 该代码实现了am,f
    该代码实现了am,f-msk,qpsk,mdpsk-the code achieved am, f-msk, qpsk, mdpsk
    2022-01-28 12:22:43下载
    积分:1
  • 包括Pheromones Algorythm、Memory Algorythm和Hill Climbing Algorythm I,II,III在内的多个人工智...
    包括Pheromones Algorythm、Memory Algorythm和Hill Climbing Algorythm I,II,III在内的多个人工智能算法的实现-including Pheromones Algorythm, Memory Algorythm and Hill Climbing Algorythm I, II, III from the number of artificial intelligence algorithms to achieve
    2022-05-14 02:23:02下载
    积分:1
  • 介绍了在VC编辑器中,加入汇编语言的以实现混合编程的方,并演示了计圆周率的过程,很不错...
    介绍了在VC编辑器中,加入汇编语言的以实现混合编程的方法,并演示了计算圆周率的过程,很不错-introduced in VC editor, by adding assembly language to achieve the mixed programming method and demonstrated the calculation of the ratio of the circumference and very good! !
    2023-08-02 07:10:02下载
    积分:1
  • 杜鹃时间
    它是杜鹃搜索算法的MATLAB语言编码。杜鹃是求解NP难问题的优化算法类型
    2022-03-23 17:43:31下载
    积分:1
  • 无噪音ofdm 产生
    这段代码有助于创造一个完整的 ofdm 链传动和无噪音,添加环前缀的接待,这种信号可以使用盲或半盲稍后同步同步
    2022-02-20 21:15:48下载
    积分:1
  • 是和“常用的计机数值和程序的C++版本,和Q ..
    是《计算机常用数值计算算法与程序 C++版》一书的配套C++程序源代码文件,每个源程序文件的文件扩展名都使用.cpp形式。这些C++程序已经在微软公司Windows 平台下的Virsual C++ 6.0环境下通过-is "commonly used computer numerical algorithms and procedures C version," a book supporting the C source code file, the source files extensions are used. Cpp form. These procedures have been in C Microsoft Windows platform under the Virsual C 6.0 environment through
    2022-05-29 11:24:03下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载