declare Sum
declare i
Sum = 0
for i = 1 to 10
begin
Sum += i
i++
end
Print Sum
program summation;
var i, summa: Word;
summa := 0;
for i := 1 to 10 do
summa := summa + i;
WriteLn('l + 2 + .+ 10 = ', summa);
end.
declare Sum
declare i
Sum = 0
for i = 1 to 10
begin
Sum += i
i++
end
Print Sum
program summation;
var i, summa: Word;
begin
summa := 0;
for i := 1 to 10 do
summa := summa + i;
WriteLn('l + 2 + .+ 10 = ', summa);
end.