#include<iostream.h> long schimba(long n) { if(n==0) return 0; else if(n%2==1) return schimba(n/10)*10+n%10-1; else return schimba(n/10)*10+n%10+1; } void main() { cout<<schimba(23362); }