Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int n, m, x,c=0,p=1,n1,i;
- cin>>n;
- n1=n;
- while(n)
- {
- n=n/10;
- c++;
- }
- if(c%2!=0)
- {
- for(i=1;i<=c/2;i++)
- {
- p=p*10;
- n=n1/(p*10)*p+n1%p;
- }
- cout<<n;
- }
- else
- {x=n%10+(n/10)*10;
- cout<<x;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement