Question: Programming langauge is JAVA: Implement a recursive method static long skipFactorial(int n, int skip) that multiplies n by n-skip, then by n-2*skip etc down to

Programming langauge is JAVA:

Implement a recursive method

static long skipFactorial(int n, int skip)

that multiplies n by n-skip, then by n-2*skip etc down to the smallest number greater than or equal to skip.

If n < skip then the function just returns 1.

For examples

skipFactorial(19, 3) is (19)(16)(13)(10)(7)(4) = 1106560

skipFactorial(4, 4) is 4

skipFactorial (4, 5 ) is 1.

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!