0:00:03.199,0:00:07.040
we need to
0:00:03.840,0:00:10.559
output the factorial of numbers five
0:00:07.040,0:00:11.840
six seven and eight so let's begin with
0:00:10.559,0:00:14.880
five
0:00:11.840,0:00:16.480
the factorial is the product of the
0:00:14.880,0:00:18.720
given number and
0:00:16.480,0:00:21.119
all positive integers less than that
0:00:18.720,0:00:23.680
number the factorial of five
0:00:21.119,0:00:24.480
would be the product of all positive
0:00:23.680,0:00:27.599
integers
0:00:24.480,0:00:30.880
less than or equal to five
0:00:27.599,0:00:34.399
i'm going to invoke put s as we want to
0:00:30.880,0:00:38.480
output the result of this operation
0:00:34.399,0:00:38.480
and we're going to count from 5
0:00:38.559,0:00:45.360
down to 1 and multiply them all together
0:00:42.800,0:00:48.640
the product of this operation will be
0:00:45.360,0:00:48.640
the factorial of five
0:00:51.280,0:00:54.399
and we see the correct result the
0:00:53.199,0:00:58.960
factorial of five
0:00:54.399,0:01:01.039
is one hundred and twenty
0:00:58.960,0:01:03.120
now that we know how to calculate the
0:01:01.039,0:01:07.119
factorial
0:01:03.120,0:01:07.119
the rest of this exercise is simple
0:01:11.040,0:01:16.479
we also want to output the factorial of
0:01:14.159,0:01:16.479
six
0:01:21.759,0:01:27.840
the factorial of seven
0:01:28.400,0:01:31.759
and the factorial of eight
0:01:36.799,0:01:40.000
and you can see that we've successfully
0:01:39.200,0:01:53.200
calculated
0:01:40.000,0:01:53.200
and output each factorial