Advertisement
Guest User

Untitled

a guest
Nov 17th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int x,y,a[20],b[20],i,ucx,oglx,ogly,ucy,cx,cy;
  4. int main()
  5. {
  6. cin>>x>>y;
  7. cx=x;
  8. cy=y;
  9. ucx=x%10;
  10. ucy=y%10;
  11. while(cx)
  12. oglx=oglx*10+cx%10 , cx/=10;
  13. while(cy)
  14. ogly=ogly*10+cy%10 , cy/=10;
  15.  
  16. cout<<ucy;
  17. cx=oglx;
  18. oglx/=10;
  19. while(oglx>9)
  20. {
  21. cout<<oglx%10;
  22. oglx/=10;
  23. }
  24. cout<<ogly%10<<" ";
  25.  
  26. cout<<ucx;
  27. ogly/=10;
  28. while(ogly>9)
  29. {
  30. cout<<ogly%10;
  31. ogly/=10;
  32. }
  33. cout<<cx%10;
  34. return 0;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement