Question: this is the code that I wrote, I want the output to show each n! and the value of it. like 0!=1 something similar to

 this is the code that I wrote, I want the output this is the code that I wrote, I want the output to show each n! and the value of it.

like 0!=1 something similar to the picture that I attach.. to show each n! and the value of it. like 0!=1 something

package myrecursioni public class MyRecursion i public static void main(String[ args) int n-10 int a -fact (n) System.out.println(" the fact of the number is" +a); public static int fact(int n) int result; if (n-1) return 1; result - fact(n-1) n: system.out.println (result); return result

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!