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:

  1. That the result of using mynum <- 5 is 120

  2. That using mynum <- 12 yields 479001600

  3. That having mynum <- 0 correctly returns 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!