Question
The factorial function is used frequently in probability problems. Using the definition of factorial in Exercise 4.35 , write a program that uses a for statement to evaluate the factorials of the integers from 1 to 5. Print theresults in tabular format. What difficulty might prevent you from calculating the factorial of $20 ?$
Step 1
First, we need to write a program that calculates the factorial of a given integer using a for loop. Show more…
Show all steps
Your feedback will help us improve your experience
Jeff Vermeire and 73 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Calculating Factorials, Combinations, Permutations evaluate the given expressions and express all results using the usual format for writing numbers (instead of scientific notation). 5. Factorial Find the number of different ways that five test questions can be arranged in order by evaluating $5 !$
Probability
Counting
In Problems 5-10, find the value of each factorial. $5 !$
Counting Techniques
Evaluate the factorial expression. $$\frac{10 !}{5 !}$$
Additional Topics in Mathematics
Sequences, Series, and Summation Notation
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD