作业九:排序算法练习

#include "assert.h"
#include 
using namespace std;

void Swappp(int &a,int &b)
{
    int temp;
    temp=a;
    a=b;
    b=temp;
}
void Sort(int a[],int n)
{
    int i=0,j=0;
    int k=n-1;
    while(j<=k)
    {
        if(a[j]==1)
        {
            if(i!=j)
            {
                Swappp(a[i],a[j]);
                cout<"<"<> n;
    int * a= new int[n];
    for (int i=0; i>a[i];
    Sort(a,n);
}

 

你可能感兴趣的:(数据结构平时作业集)