Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void rec_print_n(int n)
- {
- if(n == 0)
- {
- cout << endl;
- return;
- }
- cout << n % 10;
- rec_print_n(n/10);
- }
- int main()
- {
- rec_print_n(12345);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement