Răspuns:
#include <iostream>
using namespace std;
int main() {
int n, uc, nr2, nr3, i;
cout <<"n=";
cin >> n;
nr2= 0; nr3 = 0;
while(n > 0)
{
uc = n % 10;
if (uc == 2)
{
nr2++;
}
else if (uc == 3)
{
nr3++;
}
n = n / 10;
}
for(i = 1; i<=n3;i++)
cout<<"3";
for(i = 1; i<=n2;i++)
cout<<"2";
return 0;
}