Solution Review 1: Find The Factorial
This lesson gives a detailed solution review to the challenge in the previous lesson.
We'll cover the following...
We'll cover the following...
Solution
Explanation
-
On line 2 a mutable variable
factorialis initialized to1. -
ifconstruct-
As factorials exist only for positive numbers, the condition
n < 0on line 4, checks if the value ...
-