Example
read(n)i := 1;sum := 0;product := 1;while i <= n do begin sum := sum + i; product := product * i; i := i + 1;end;write(sum);write(product);
product := 1;while i <= n do begin product := product * i; i := i + 1;end;
This example (and other material) due in part to Frank Tip