vector_recursion

mail@pastecode.io avatar
unknown
c_cpp
3 years ago
172 B
10
Indexable
Never
#include <iostream>

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

int main()
{
    func(5);
    return 0;
}