题目:有一个已经排好序的数组。现输入一个数,要求按原来的规律将它插入数组中。 1. 程序分析:首先判断此数是否大于最后一个数,然后再考虑插入中间的数的情况,...
代码说明:
题目:有一个已经排好序的数组。现输入一个数,要求按原来的规律将它插入数组中。 1. 程序分析:首先判断此数是否大于最后一个数,然后再考虑插入中间的数的情况,插入后 此元素之后的数,依次后移一个位置。 2.程序源代码:-Title: already have a good sequence of the array row. Now enter a number of requirements in accordance with the laws of the original array to insert it. 1. Program analysis: First, to determine whether this number is greater than the last few, and then inserted between a few to consider the case, insert the following after the element number, followed by one position after the shift. 2. Program source code:
下载说明:请别用迅雷下载,失败请重下,重下不扣分!