fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main(){
  5. cout << number(7);
  6. return 0;
  7. }
  8. int number(int N) {
  9. if (N == 0) return 0;
  10. if (N == 1) return 1;
  11. return N*number(N - 1);
  12. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:5:18: error: ‘number’ was not declared in this scope
  cout << number(7);
                  ^
stdout
Standard output is empty