+ 1
How to solve this error???
4 RĂ©ponses
+ 5
Prince Verma Solution : đ đ€đââïž
https://code.sololearn.com/cznqhMy4E0En/?ref=app
+ 4
The error shown is caused because you are trying to return a value without specifying a return type, public static int factorial(int n)
There are a couple other errors to fix. Try to solve those on your own but if you get stuck ill post them
+ 4
Prince Verma : đ đ€đââïž
Example : factorial (3)
n=3
value=factorial(n-1)*n
value=factorial(3-1)*3
value=factorial(2)*3
n=2
value=factorial(n-1)*n*3
value=factorial(2-1)*2*3
value=factorial(1)*2*3
value=1*2*3
value=6
+ 1
wow wow
thanks but can you explain me
what about after return 1;