fork download
  1. #ifndef FUNCTION14_H_
  2. #define FUNCTION14_H_
  3. #include <bits/stdc++.h>
  4. using namespace std;
  5. int factorial(int m);
  6. int comb(int n,int k);
  7. int main ()
  8. {
  9. int n;
  10. cin >> n;
  11.  
  12. long long sum1 = 0, sum2 = 0;
  13. for (int i = 0; i < n; i++)
  14. {
  15. int a, b, c;
  16. cin >> a >> b >> c;
  17. sum1 += factorial(a);
  18. sum2 += comb(b, c);
  19. }
  20.  
  21. cout << sum1 << ' ' << sum2 << '\n';
  22. }
  23. #endif
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
/usr/bin/ld: /home/v0NWtm/cc22ppKc.o: in function `main':
prog.cpp:(.text.startup+0x86): undefined reference to `factorial(int)'
/usr/bin/ld: prog.cpp:(.text.startup+0x98): undefined reference to `comb(int, int)'
collect2: error: ld returned 1 exit status
stdout
Standard output is empty