Answer

We've declared a new variable, ``I'', and initialized it to 1. Then, in each pair of statements that follows, we've first squared and summed ``I'' and then added 1 to it. This ensures that the value of I counts up by one before each pair of statements is executed.

Return to lesson.



Hamlet Project
hamlet@cs.utah.edu