public class Main { public static void main(String[] args) { System.out.println("Your factorial is: " + factorial(9)); }}
public static int factorial(int number) { if (number == 0) { return 1; } return number * factorial(number -1);}
i need help fixing this code involving recursion
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here