Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- ifstream fin ("cifre.in");
- ofstream fout ("cifre.out");
- int main ()
- {
- int a , b , v[10] = {0}, c ;
- cin >> a >> b ;
- while (a)
- {
- c=a%10;
- v[c]++;
- a/=10;
- }
- while (b)
- {
- c=b%10;
- v[c]++;
- b/=10;
- }
- for(c=9; c >=0 ; c--)
- while (v[c])
- {
- cout << c ;
- v[c]--;
- }
- return 0 ;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement