Skip to main content
Logo image

Section 10.5 Continue to Practice Your Advanced Branching!

Subsection 10.5.1 Practice 3

Activity 10.6.

Okay, time to try it out. Take a look at the output of the program. Is this what you came up with? If not, do you understand the difference? Please ask questions if anything is unclear.

admin.....open in new window

Subsection 10.5.2 Practice 4

Your turn!

Activity 10.7.

Below is a program that calculates the factorial of a number, for example, when N=5, N! = 5*4*3*2*1 = 120.
Modify this program so that it prints a list of the factorials from 1! to 10!, that is something like:
1! = 1
2! = 2
3! = 6
4! = 24
5! = 120
6! = 720
...
Your program should use nested loops to accomplish this task.

admin.....open in new window

When you are done, please put your code into the code submission box below: