4
Σ (S!+S)
S=1
найдите ошибку, плиз
program mar; uses crt; var F,S:integer; k:real; begin clrscr; F:=1; k:=0; for S:=1 to 4 do begin F:=F*S; k:=k*(F+S); end; writeln('k =',k:4:2); 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.