1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
uses crt;
var k,m,p:integer;
begin
repeat
write('Введите целое число больше 1 m=');
readln(m);
until m>1;
if m<=4 then
p:=4;
k:=1
end
else
k:=1;
p:=1;
while p<=m do
k:=k+1;
p:=p*4;
end;
k:=k-1;
writeln('k=',k,' 4^',k,'=',p);
end.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
uses crt;
var k,m,p:integer;
begin
repeat
write('Введите целое число больше 1 m=');
readln(m);
until m>1;
if m<=4 then
begin
p:=4;
k:=1
end
else
begin
k:=1;
p:=1;
while p<=m do
begin
k:=k+1;
p:=p*4;
end;
k:=k-1;
end;
writeln('k=',k,' 4^',k,'=',p);
end.