文件名称:maopaopaixu
介绍说明--下载内容均来自于网络,请自行研究使用
依次比较相邻的两个数,将小数放在前面,大数放在后面。即首先比较第1个和第2个数,将小数放前,大数放后。然后比较第2个数和第3个数,将小数放前,大数放后,如此继续,直至比较最后两个数,将小数放前,大数放后。重复以上过程,仍从第一对数开始比较(因为可能由于第2个数和第3个数的交换,使得第1个数不再小于第2个数),将小数放前,大数放后,一直比较到最大数前的一对相邻数,将小数放前,大数放后,第二趟结束,在倒数第二个数中得到一个新的最大数。如此下去,直至最终完成排序。
-Comparison of the two numbers adjacent turn, will put a decimal in front of large numbers on the back. That is, first compare the first one and number two will be put before the decimal, after the release of large numbers. Then compare the number 2 and number 3 will be put before the decimal, after the release of large numbers, and so continue until the compare the last two numbers will be put before the decimal, after the release of large numbers. Repeat the above process, still starting from the first of a few more (as may be due to the number 2 and number 3, the exchange, making the first number is no longer a number less than the first two) will be put before the decimal, large numbers release, it has been compared to the maximum number before a pair of adjacent numbers to decimal place before the release of large numbers, the second trip is over, the penultimate number to get a new maximum number. So on, until the completion of the final order.
-Comparison of the two numbers adjacent turn, will put a decimal in front of large numbers on the back. That is, first compare the first one and number two will be put before the decimal, after the release of large numbers. Then compare the number 2 and number 3 will be put before the decimal, after the release of large numbers, and so continue until the compare the last two numbers will be put before the decimal, after the release of large numbers. Repeat the above process, still starting from the first of a few more (as may be due to the number 2 and number 3, the exchange, making the first number is no longer a number less than the first two) will be put before the decimal, large numbers release, it has been compared to the maximum number before a pair of adjacent numbers to decimal place before the release of large numbers, the second trip is over, the penultimate number to get a new maximum number. So on, until the completion of the final order.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
第九章习题4.cpp