# 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);

This example (and other material) due in part to Frank Tip

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);