Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int main()
- {
- char s[105];
- scanf("%s", s);
- int l = strlen(s);
- int t = 0;
- int n[l];
- for(int i = 0; i<l; i+=2)
- {
- n[t] = s[i]-'0';
- t++;
- }
- sort(n, n+t);
- for(int i = 0; i<t; i++)
- {
- if(i==t-1)
- {
- printf("%d", n[i]);
- }
- else
- {
- printf("%d+", n[i]);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement