
159
11.8 | FIND THE SUM OF FACTORIALS
For any beginner, this may be apparently a complex problem, to be avoided initially.
However, if the problem is broken to smaller modules, it would become much easier to
comprehend. For example, after practicing in long hand the bubble sorting technique
with a few random integers, start with the swapping technique. Once this is mastered,
think of how to manipulate the pointers during any one pass. This approach would help
you to solve simpler modules one at a time which would lead to the fi nal solution.
11.8 | Find the Sum of Factorials
Example 11.7
Purpose: Example of nested subroutines.
Problem
A few random ...