Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void afisare(int i, int n){
- if(i>=n) cout << i << " ";
- else{ afisare(i+1,n);
- cout << i << " ";}
- }
- int main(){
- int i=0,n;
- cin >> n;
- afisare(i,n);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement