Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void action(int n)
- {
- std::cout << n << '\n';
- }
- void revLoopRecursion(int n)
- {
- std::cout << "In" << '\n';
- if (n - 1 == 0)
- {
- action(0);
- }
- else
- {
- action(n - 1);
- revLoopRecursion(n - 1);
- }
- std::cout << "Out" << '\n';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement