Ответ:
38
function P(n:integer):integer; forward;
function S(n:integer):integer;
begin
if n > 3 then
S:=S(n-2)+P(n-2)+S(n-3)
else S:=n+3
end;
function P(n:integer):integer;
P:=P(n-2)+S(n-2)+P(n-3)
else P:=4+n
write (P(6))
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
38
function P(n:integer):integer; forward;
function S(n:integer):integer;
begin
if n > 3 then
S:=S(n-2)+P(n-2)+S(n-3)
else S:=n+3
end;
function P(n:integer):integer;
begin
if n > 3 then
P:=P(n-2)+S(n-2)+P(n-3)
else P:=4+n
end;
begin
write (P(6))
end.