+ 1
What is the error with this code? can't understand
5 Answers
+ 7
Just change else part using
n * method(n - 1)
+ 4
Replace by this in your code
if (num == 1)
return 1;
else
return(num + method(num - 1));
+ 1
đ
°đ
š - ÉŞ'á´ á´ĘÉŞá´ÉŞÉ´á´ĘĘĘ É˘á´á´á´
! Thank you Anant
How can I get 6 as output which as factorial of 3
+ 1
Thank you đ
°đ
š - ÉŞ'á´ á´ĘÉŞá´ÉŞÉ´á´ĘĘĘ É˘á´á´á´
! Anant brother you are always best with Java...
0
Thank you Coder Kitten. got the exact definition what I looked for actually its a quiz in java sololearn...