En version med simpel boblesort:
#include <algorithm>
#include <iostream>
#include <vector>
#include <iterator>
int main()
{
std::vector<int >Tal;
std::cout << "Enter some numbers, followed by enter, hit <ctrl>+Z to stop" << std::endl;
int T;
while(std::cin >> T)
Tal.push_back(T);
std::vector<int >::size_type a, b;
for(a = 0; a < Tal.size() - 1; a++)
for(b = a + 1; b < Tal.size(); b++)
if(Tal[a] > Tal[b])
std::swap(Tal[a], Tal[b]);
for(a = 0; a < Tal.size(); a++)
std::cout << Tal[a] << std::endl;
}