e verbs in
lian restaurant. He couldn't
(3)
(work
iness, his own restaurant. At
Adam wasn't interested inTraveller
Adam wasn't interested in
Задание 2.
program prog;
function F(n:integer):integer;
begin
if n<=1 then F:=1
else F:=F(n-1)+F(n-2)
end;
write(F(7))
end.
Вывод программы: 21
Задание 3.
else F:=F(n-1)*F(n-2)+2
write(F(5))
Вывод программы: 87
Задание 5.
procedure F(n:integer);
write('*');
if n > 0 then begin
F(n-2);
F(n div 2);
end
F(5);
Вывод программы (34 звёздочки):
Задание 6.
procedure F(n: integer);
F(n-3);
F(6);
Вывод программы (97 звёздочек):
Задание 7.
Вывод программы (77 звёздочек):
e verbs in
lian restaurant. He couldn't
(3)
(work
iness, his own restaurant. At
Adam wasn't interested inTraveller
e verbs in
lian restaurant. He couldn't
(3)
(work
iness, his own restaurant. At
Adam wasn't interested inTraveller
e verbs in
lian restaurant. He couldn't
(3)
(work
iness, his own restaurant. At
Adam wasn't interested inTraveller
e verbs in
lian restaurant. He couldn't
(3)
(work
iness, his own restaurant. At
Adam wasn't interested inTraveller
e verbs in
lian restaurant. He couldn't
(3)
(work
iness, his own restaurant. At
Adam wasn't interested inTraveller
e verbs in
lian restaurant. He couldn't
(3)
(work
iness, his own restaurant. At
Adam wasn't interested inTraveller
e verbs in
lian restaurant. He couldn't
(3)
(work
iness, his own restaurant. At
Adam wasn't interested inTraveller
e verbs in
lian restaurant. He couldn't
(3)
(work
iness, his own restaurant. At
Adam wasn't interested inTraveller
e verbs in
lian restaurant. He couldn't
(3)
(work
iness, his own restaurant. At
Adam wasn't interested inTraveller
e verbs in
lian restaurant. He couldn't
(3)
(work
iness, his own restaurant. At
Adam wasn't interested inTraveller
e verbs in
lian restaurant. He couldn't
(3)
(work
iness, his own restaurant. At
Adam wasn't interested inTraveller
e verbs in
lian restaurant. He couldn't
(3)
(work
iness, his own restaurant. At
Adam wasn't interested in
Задание 2.
program prog;
function F(n:integer):integer;
begin
if n<=1 then F:=1
else F:=F(n-1)+F(n-2)
end;
begin
write(F(7))
end.
Вывод программы: 21
Задание 3.
program prog;
function F(n:integer):integer;
begin
if n<=1 then F:=1
else F:=F(n-1)*F(n-2)+2
end;
begin
write(F(5))
end.
Вывод программы: 87
Задание 5.
program prog;
procedure F(n:integer);
begin
write('*');
if n > 0 then begin
F(n-2);
F(n-2);
F(n div 2);
end
end;
begin
F(5);
end.
Вывод программы (34 звёздочки):
Задание 6.
program prog;
procedure F(n: integer);
begin
write('*');
if n > 0 then begin
F(n-3);
F(n-2);
F(n div 2);
F(n div 2);
end
end;
begin
F(6);
end.
Вывод программы (97 звёздочек):
Задание 7.
program prog;
procedure F(n: integer);
begin
write('*');
if n > 0 then begin
write('*');
F(n-2);
F(n-2);
F(n div 2);
end
end;
begin
F(6);
end.
Вывод программы (77 звёздочек):