Problem factorial_easy
User JcYong
Submission Time 2024-06-20 14:09:24
Score 0
Max Time N/A
Max Memory N/A

Compile Error

factorial_easy.cpp:4:2: error: expected initializer before ‘if’
4 | if(n == 0){
| ^~
factorial_easy.cpp:7:2: error: expected unqualified-id before ‘return’
7 | return n * factorial(n-1)
| ^~~~~~
factorial_easy.cpp:8:1: error: expected declaration before ‘}’ token
8 | }
| ^
factorial_easy.cpp: In function ‘int main()’:
factorial_easy.cpp:12:10: error: ‘factorial’ was not declared in this scope
12 | cout << factorial(n);
| ^~~~~~~~~