Răspuns:
#include<iostream>
#include<fstream>
using namespace std;
ifstream fcin("date.in");
ofstream fcout("rez.out");
int n,i,x,c,m,r;
int main()
{
fcin>>n;
for(i=1;i<=n;i++)
{
fcin>>x;
m=0;
c=0;
r=0;
while(x)
{
if((x%10)%2==1)
c=c*10+x%10;
x/=10;
}
while(c)
{
r=r*10+c%10;
c/=10;
}
fcout<<r<<" ";
}
}
Explicație: