fork download
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. void go(int x){
  4. if(x==0) return;
  5. cout<<x<<' ';
  6. go(x-1);
  7. }
  8. int main(){
  9. ios::sync_with_stdio(0); cin.tie(0);
  10. int n; cin>>n;
  11. go(n);
  12. }
Success #stdin #stdout 0s 5292KB
stdin
5
stdout
5 4 3 2 1