    #include <iostream>
    #include <string>
    #include <vector>
    using namespace std;
    void Seperate (vector<int> & input);
    int main(int argc, char* argv[])
    {
    vector<int> input;
    cout<< "Enter the 10 numbers that you want to be seperated"<<endl;
    for(int x=0;x<10;x++)
    {
    char y;
    cin>> y;
    input.push_back(y - '0');
    }
    Seperate(input);
    for(int y=0;y<10;y++)
    {
    cout<< input[y];
    }
     
    return 0;
    }
     
    void Seperate (vector<int> &input)
    {
    string newvec;
    int size;
    size=input.size();
    int start=0;
    int end=size;
    while (true) {
    while ((start != end) && (input[start] % 2 == 0)) {
    ++start;
    } //This part gets the even numbers.
    if (start == end--) break; //Checks if we are done.
    while ((start != end) && (input[end] % 2 != 0)) {
    --end;
    }
    if (start == end) break;//Checks if we are done.
    swap(input[start++], input[end]);
    }
    }