#include void InSertSort(int R[],int n);特别这一行void main(){int arr[]={0,1,2,3,4,5,6,7,8,9};int n=9;InSertSort(arr,10);}void InSertSort(int R[],int n)特别这一行{int i,j;int temp;for(i=1;i=0&&temp

来源:学生作业帮助网 编辑:作业帮 时间:2024/08/16 20:05:11
#include void InSertSort(int R[],int n);特别这一行void main(){int arr[]={0,1,2,3,4,5,6,7,8,9};int n=9;InSertSort(arr,10);}void InSertSort(int R[],int n)特别这一行{int i,j;int temp;for(i=1;i=0&&temp
xR]OP+$K $o ߭^/dI,c!$ X:cs9e֊Ϝrsq*d(rye.DiV*j1253 d7"ӊ`/d5+̦K H]ƥ)-_lV8+cl{Rwf:?JM{pB۶kAeo4k.a/O ._=0,C19{v£6~߼ڛtD~[Ѹ5bNWzo&]>xYhv<.wKBV?_5T$

#include void InSertSort(int R[],int n);特别这一行void main(){int arr[]={0,1,2,3,4,5,6,7,8,9};int n=9;InSertSort(arr,10);}void InSertSort(int R[],int n)特别这一行{int i,j;int temp;for(i=1;i=0&&temp
#include
void InSertSort(int R[],int n);特别这一行
void main()
{
int arr[]={0,1,2,3,4,5,6,7,8,9};
int n=9;
InSertSort(arr,10);
}
void InSertSort(int R[],int n)特别这一行
{
int i,j;
int temp;
for(i=1;i=0&&temp

#include void InSertSort(int R[],int n);特别这一行void main(){int arr[]={0,1,2,3,4,5,6,7,8,9};int n=9;InSertSort(arr,10);}void InSertSort(int R[],int n)特别这一行{int i,j;int temp;for(i=1;i=0&&temp
这是个插入排序算法,void InSertSort(int R[],int n);为函数原型声明,告诉编译器,InSertSort为一个函数,有两个参数.这样在主函数中调用时,就不会出现编译错误.后面那个void InSertSort(int R[],int n)为函数的实现,对R里面的元素进行排序.具体算法原理可百度:插入排序算法.当然了,如果把函数的实现写在主函数前面,就可以把第一句void InSertSort(int R[],int n);删掉.