fork download
  1. int k = 1;
  2. void bkt(int poz)
  3. {
  4. if (poz == n)
  5. {
  6. if (okay() == 1)
  7. display();
  8. }
  9. else
  10. {
  11. for (int i = k; i <= el_maxim - ( n - k); i++)
  12. {
  13. sol[poz] = i;
  14. bkt(poz + 1);
  15. }
  16. k++;
  17. }
  18. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:4:16: error: use of undeclared identifier 'n'
    if (poz == n)
               ^
prog.cpp:6:13: error: use of undeclared identifier 'okay'
        if (okay() == 1)
            ^
prog.cpp:7:13: error: use of undeclared identifier 'display'
            display();
            ^
prog.cpp:11:43: error: use of undeclared identifier 'n'
        for (int i = k; i <= el_maxim - ( n - k); i++)
                                          ^
prog.cpp:11:30: error: use of undeclared identifier 'el_maxim'
        for (int i = k; i <= el_maxim - ( n - k); i++)
                             ^
prog.cpp:13:13: error: use of undeclared identifier 'sol'
            sol[poz] = i;
            ^
6 errors generated.
stdout
Standard output is empty