fork(2) download
  1. #include<iostream>
  2. #include<map>
  3. #include<list>
  4. using namespace std;
  5. void fun (int n,int a)
  6. {
  7. for(int i=1;i<=n;i++)
  8. {
  9. if(i!=a)
  10. cout<<i<<endl;
  11. }
  12. }
  13. void print(int n)
  14. {
  15. for(int i =1;i<=n;i++)
  16. fun(n,i);
  17. }
  18. int main()
  19. {
  20. int n;
  21. cin>>n;
  22. print(n);
  23. }
Success #stdin #stdout 0.01s 5540KB
stdin
Standard input is empty
stdout
Standard output is empty