program Summation;
varK, P, i: integer;
beginP := 0;K := 4;i := 1;
repeatP := P + K;K := K + 3;i := i + 1;until P > 4;
writeln('Sum of the series: ', P);writeln('Number of terms: ', i);end.
program Summation;
var
K, P, i: integer;
begin
P := 0;
K := 4;
i := 1;
repeat
P := P + K;
K := K + 3;
i := i + 1;
until P > 4;
writeln('Sum of the series: ', P);
writeln('Number of terms: ', i);
end.