Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program MaxPowerOfFour;
- uses math;
- var
- m, k: integer;
- answer: real;
- begin
- write('Введите целое число m: ');
- readln(m);
- if (m <= 1) then
- begin
- writeln('Необходимо ввести число, большее чем 1.');
- Exit;
- end;
- k := 0;
- while Power(4, k) < m do
- begin
- k := k + 1;
- end;
- k := k - 1;
- answer := Power(4, k);
- writeln('Наибольшее число: ', answer:0:2);
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement