// AlgTest.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "iostream"
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
int a[9]={12,34,2,78,1,78,34,33,8};
int start=0,end=8;
for(int i=start,tag=1;i<end&&tag==1;i++)
{
tag=0;
for(int j=end;j>i;j--)
{
if(a[j]<a[j-1])
{
tag=1;
a[j-1]^=a[j];
a[j]^=a[j-1];
a[j-1]^=a[j];
}
}
}
for(int i=0;i<9;i++)
cout<<a[i]<<" ";
cin.get();
return 0;
}