色婷婷狠狠18禁久久YY,CHINESE性内射高清国产,国产女人18毛片水真多1,国产AV在线观看

C語言實現一個函數

劉姿婷2年前22瀏覽0評論

C語言實現一個函數?

#include<iostream.h>

void sort(int a[],int n) //升序

{

for(int i=0;i<n;i++)

for(int j=i+1;j<n;j++)

{

if(a[i]<a[j])

{

int temp;

temp=a[i];

a[i]=a[j];

a[j]=temp;

}

}

}

void main()

{

int a[10];

for(int i=0;i<10;i++)

cin>>a[i];

sort(a,10);

cout<<"after sorted,the array is:"<<endl;

for(i=0;i<10;i++)

cout<<a[i]<<" ";

cout<<endl;

}

java數組快速排序,C語言實現一個函數