vector_recursion

 avatar
unknown
c_cpp
4 years ago
172 B
13
Indexable
#include <iostream>

void func(int n)
{
    std::cout << n;
    if (n == 1)
        return;
    return func(--n);
}

int main()
{
    func(5);
    return 0;
}
Editor is loading...