Untitled

 avatar
unknown
c_cpp
a year ago
423 B
5
Indexable
#include <iostream>
#include <set>
#include <algorithm>
using namespace std;

void rec(int x) {
    if(x == 0) {
        return;
    }
    
    rec(x - 1);
    cout << x << " ";
}
int main()
{
    ios_base::sync_with_stdio(false);
    rec(5);
   return 0;
}
// rec(5) | cout << 5 << endl;
// rec(4) | cout << 4 << endl;
// rec(3) | cout << 3 << endl;
// rec(2) | cout << 2 << endl;
// rec(1) | cout << 1 << endl;
// rec(0)
Editor is loading...
Leave a Comment