program sumr;
procedure summa;
var i, factorial, sum:integer;
begin
factorial:=1;
sum:=0;
for i:=1 to 6 do
factorial:=factorial*i;
sum:=sum+factorial;
end;
writeln ('summa ryada = ', sum);
summa;
end.
Объяснение:
program sumr;
procedure summa;
var i, factorial, sum:integer;
begin
factorial:=1;
sum:=0;
for i:=1 to 6 do
begin
factorial:=factorial*i;
sum:=sum+factorial;
end;
writeln ('summa ryada = ', sum);
end;
begin
summa;
end.
Объяснение: