•
Contents
•
Up
•
Test
•
Suppose that sum(
n
) is defined as follows.
case sum(n) = 1 when n == 1 case sum(n) = sum(n-1) + n
You would like to check that sum(
n
) = 1 + 2 + ... +
n
by trying it for sum(5). Do an evaluation of sum(5). But assume that sum(
k
) = 1 + 2 + ... +
k
for all values of
k
that are less than 5.
Answer
Store