Advertisement
Josif_tepe

Untitled

Nov 16th, 2021
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. void rec(int i) {
  5.     if(i == 51) {
  6.         return;
  7.     }
  8.     if(i % 2 == 0) {
  9.         cout << i << " ";
  10.     }
  11.     rec(i + 1);
  12. }
  13. int main()
  14. {
  15.     rec(1);
  16.    
  17.         return 0;
  18. }
  19. /*
  20.  
  21.  **/
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement