Advertisement
Josif_tepe

Untitled

Oct 6th, 2021
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.26 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. #include <algorithm>
  4. #include <vector>
  5. using namespace std;
  6.  
  7. void print(int x) {
  8.     if(x == 0) {
  9.         return;
  10.     }
  11.    
  12.     cout << x << endl;
  13.     print(x - 1);
  14. }
  15. int main() {
  16.     print(100);
  17.     return 0;
  18. }
  19.  
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement