Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main ()
- {
- int rez=0,n,aux,ogl=t;
- cin>>n;
- aux=n;
- while (aux>0)
- {
- t=aux%10;
- if (t%2==0)
- {
- rez=rez*10+(t-1);
- }
- else
- {
- rez=rez*10+t;
- }
- aux=aux/10;
- }
- while (rez>0)
- {
- ogl=ogl*10+rez%10;
- rez=rez/10;
- }
- cou<<ogl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement