Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started