Hello,
In this program, we use a recursive function integerSum()
to find the sum of an integer number.
For example: integerSum(5)
returns 1 + 2 + 3 + 4 + 5, which is 15.
Here, the argument of integerSum()
function is 5, and total
is 15.
return 0
is a statement to run once an end condition is met.