#include "stdafx.h"
#include<vector>
#include<iterator>
#include<iostream>
using namespace std;
int main()
{
vector<int> vect;
vector<int>::iterator pos1,pos2;
int num;
while (cin >> num)
{
vect.push_back(num);
}
for (vector<int>::size_type index = 0 ; index <= vect.size();index++)//控制遍数(此处还不完善。因为不一定所有序列都要进行n遍比较)
{
pos1 = pos2 = vect.begin(); //初始化让两个迭代器都执行起始点
++pos2; //总指向比pos1靠前的位置
while (pos2 != vect.end()) //每次循环都进行所有元素的比较
{
if ((*pos2) < (*pos1))
{
vector<int>::size_type tmp = *pos2;
*pos2 = *pos1;
*pos1 = tmp;
}
++pos1;
++pos2;
}
}
for (vector<int>::iterator iter = vect.begin();iter != vect.end();++iter)
{
cout << *iter << " ";
}
}