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; }...


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



Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here