Test1

#include
using namespace std;

void sort(int b[],int count);
int main()
{
    int a[N];
    cout<        <<"please input the "<    for(int i=0;i        cin>>a[i];
    cout<        <<"the original numbers you have inputed are: "<    for(i=0;i    cout<<" "<    cout<        <<"After sorting the numbers ,the numbers are:"<    sort(a,N);
    return 0;
}
void sort(int b[],int count)
{
    int t,tempt;
    for(int i=0;i    {
    t=count-i-1;
    for(int j=0;j    {
        if(b[j]>b[j+1])
            swap(b[j],b[j+1],tempt);
    }
    }
    for(i=0;i        cout<<" "<}

你可能感兴趣的:(Test1)