Задание 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 звёздочек):
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
Поделитесь своими знаниями, ответьте на вопрос:
12) скорость передачи данных через выделенный канал связи равна 256000 бит/с. передача файла через данные соединение заняла 4 минуты. определите размер файла в килобайтах? 13 впорос) 1/4 байта в килобайтах, 1, 5 килобайта в байтах. 14 вопрос) после изменения свойств рабочего стола монитор приобрел разрешение 1024 на 768 пикселей и получил возможность отображать 65356 цветов. какой объем видеопамяти необходим для текущего изображения рабочего стола?
13) 0,25/1024 = 0,000244140625 килобайт; 1.5*1024=1536 байт
14) 1024*768*2=1572864