Blog o’ Will Cook for Food
Not just another Wordpress blog

12.1

1.

Recursive definitions are not circular because finding sum(n) is finding the sum of n + whatever comes before n, cycling down to 1.

2.

a recursive method must have a stopping state and a recursive step.

3.

4.

Using recursion allows a user to find large sums or the sum of a large series of numbers.

5.

2 x 5

2 x 4

2 x 3

2 x 2

2 x 1

1

6. This method prints n until n = 0

if n = 3, this would print

3

No Responses Yet to “12.1”

Leave a Reply