Untitled

mail@pastecode.io avatar
unknown
c_cpp
2 years ago
501 B
0
Indexable
Never
#include<bits/stdc++.h>
using namespace std;
#define endl "\n"

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    string str; cin >> str;

    int arr[100];
    int n = 0;

    for(int i=0;i<str.length();i++){

        if(isdigit(str[i])){
            arr[n] = str[i] - '0';
            n++;
        }

    }

    sort(arr,arr+n+1);

    for(int i=1;i<n;i++){

        cout << arr[i] << "+";

    }

    cout << arr[n];

    return 0;

}