AlaminSakib

Recursive Bit Manipulation [BJIT]

Dec 18th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.23 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4. void the_func(int n)
  5. {
  6.     if(!n) return;
  7.     int f = n % 10;
  8.     the_func(n / 10);
  9.     cout << f << " ";
  10.     return;
  11. }
  12.  
  13. int main()
  14. {
  15.     int n = 1000;
  16.     the_func(n);
  17. }
Advertisement
Add Comment
Please, Sign In to add comment