Recursive functions work by
calling themselves to solve subproblems until the
subproblems are simple enough for them to solve directly.
The portion of a recursive function that handles the simplest
cases is called the base part; the portion that transforms
more complex cases is called the recursion part.
If you want to solve a difficult problem, then try to break it up
into simpler subproblems.
If you are writing a recursive function, then your
function must handle the simplest cases, and must break down
every other case into the simplest cases.
If your recursive function is to count down a number, then
you may be able to instantiate the following pattern:
int function name (int n) {
if (n == 0)
return result for n equal 0;
else
return combination operandcombination operatorfunction name (n - 1);
}