Răspuns :
Răspuns:
#include <iostream>
using namespace std;
int main()
{
int n, m=0, uc;
cin >> n;
while (n) {
uc=n%10;
n=n/10;
if (uc%2==0) {
m=m*100+uc*10+uc;
}
else m=m*10+uc;
}
cout << m;
return 0;
}
Explicație:
Succese!
COROANA TE ROG!!!
#include<iostream>
using namespace std;
int main(){
int n, in=0;
cin>>n;
while(n!=0){
((n%10)%2==0)?in=(in*10+n%10)*10+n%10:in=in*10+n%10;
n/=10;
}
cout<<in;
return 0;
}