Запишите число 100,225 в ячейку памяти компьютера, предназначенную для типа Real
Answers & Comments
HRAshtonfunction Pow(m: real; n: integer): real; var i: byte; m_1: real := m; begin if (n > 0) then for i := 2 to n do m_1 := m_1 * m else if (n = 0) then m_1 := 1 else m_1 := 1 / Pow(m, Abs(n)); Pow := m_1; end;
procedure AddDec(i: integer; var m: real); begin m := m + i * Pow(10, -1 * length(inttostr(i))); end;
var i: byte; r: real;
begin for i := 1 to 100 do r := r + 1; AddDec(225, r); Writeln(r); end.
Answers & Comments
var i: byte; m_1: real := m;
begin
if (n > 0) then
for i := 2 to n do
m_1 := m_1 * m
else
if (n = 0) then
m_1 := 1
else
m_1 := 1 / Pow(m, Abs(n));
Pow := m_1;
end;
procedure AddDec(i: integer; var m: real);
begin
m := m + i * Pow(10, -1 * length(inttostr(i)));
end;
var
i: byte;
r: real;
begin
for i := 1 to 100 do
r := r + 1;
AddDec(225, r);
Writeln(r);
end.