Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int a, s = 0;
- cin >> a;
- int b = 10000000;
- for (int i = 7; i > -1; i--, b /= 10) {
- int x = a / b;
- s += x << i;
- a -= b * x;
- }
- cout << s;
- system("PAUSE");
- return 0;
- }
Add Comment
Please, Sign In to add comment