Guest User

Untitled

a guest
Feb 19th, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3. int x[10],n;
  4. void afisare(int n)
  5. {
  6. for(int i=1;i<=n;i++)
  7. cout<<x[i]<<",";
  8. cout<<"\b";
  9. cout<<endl;
  10. }
  11. void back(int i)
  12. {int sn=0;
  13. for(int j=x[i-1]+1;j<=11;j++)
  14. {
  15. x[i]=j;
  16. afisare(i);
  17. back(i+1);
  18. }
  19. }
  20. int main()
  21. {;
  22. back(1);
  23. }
Add Comment
Please, Sign In to add comment