4th Sep 2018, 4:57 AM
Prince Verma
Prince Verma - avatar
4 Antworten
5th Sep 2018, 6:49 AM
NimWing Yuan
NimWing Yuan - avatar
+ 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
4th Sep 2018, 5:14 AM
JME
+ 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
5th Sep 2018, 7:01 AM
NimWing Yuan
NimWing Yuan - avatar
+ 1
wow wow thanks but can you explain me what about after return 1;
5th Sep 2018, 6:52 AM
Prince Verma
Prince Verma - avatar