Вот так?
Program solution;Uses Crt;Var s : byte;res, fact : word;Beginfact := 1;res := 0;For s := 1 to 4 do Begin res := res + s + fact; fact := fact * (s + 1); End;Write(res);ReadKey;End.
Вот так?
Program solution;
Uses Crt;
Var s : byte;
res, fact : word;
Begin
fact := 1;
res := 0;
For s := 1 to 4 do
Begin
res := res + s + fact;
fact := fact * (s + 1);
End;
Write(res);
ReadKey;
End.