Question: Rstuido Write a while loop that computes and stores as a new object the factorial of any non-negative integer mynum by decrementing mynum by 1
Rstuido
Write a while loop that computes and stores as a new object the factorial of any non-negative integer mynum by decrementing mynum by 1 at each repetition of the braced code.
Using your loop, confirm the following:
-
That the result of using mynum <- 5 is 120
-
That using mynum <- 12 yields 479001600
-
That having mynum <- 0 correctly returns 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
