Guest User

Untitled

a guest
Jan 12th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6. int a, s = 0;
  7. cin >> a;
  8.  
  9. int b = 10000000;
  10.  
  11. for (int i = 7; i > -1; i--, b /= 10) {
  12. int x = a / b;
  13. s += x << i;
  14. a -= b * x;
  15. }
  16.  
  17. cout << s;
  18.  
  19. system("PAUSE");
  20. return 0;
  21. }
Add Comment
Please, Sign In to add comment