Advertisement
dumitreskw

Untitled

Nov 27th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. void afisare(int i, int n){
  4. if(i>=n) cout << i << " ";
  5. else{ afisare(i+1,n);
  6. cout << i << " ";}
  7. }
  8. int main(){
  9. int i=0,n;
  10. cin >> n;
  11. afisare(i,n);
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement