НЕ ПИШИТЕ БРЕД В КОМЕНТЫ. даны следующие операторы укажите 1) имена вызываемых процедур, 2)число фактических параметров каждой процедуры а так же их 3)фактические параметры
//PascalABC.NET 3.1 сборка 1239 const n = 10; m = 10;
var i, j: integer; a, b: array[1..n, 1..m] of integer; f: boolean;
begin for i := 1 to n do begin for j := 1 to m do begin a[i, j] := random(50); write(a[i, j]:3, ' '); end; writeln; end; writeln;
for i := 1 to n do begin f := false; for j := 1 to m do begin if not f and (a[i, j] mod 2 = 1) then begin a[i, j] := 2 * a[i, j]; f := true; end; write(a[i, j]:3, ' '); end; writeln; end; end.
1010111₂ = 127₈
4576₈ = 2430₁₀
16AC₁₆ = 1011010101100₂
11101₂ * 110₂ = 10101110₂
1011110₂ - 101₂ = 1011001₂
1001₂ + 1010₂ = 10011₂
Объяснение:
1010111₂ = 1*2⁰ + 1*2¹ + 1*2² + 0*2³ + 1*2⁴ + 0*2⁵ + 1*2⁶ = 87₁₀
87₁₀ = 7*8⁰ + 2*8¹ + 1*8² = 127₈
4576₈ = 6*8⁰ + 7*8¹ + 5*8² + 4*8³ = 2430₁₀
16AC₁₆ = C*16⁰ + A*16¹ + 6*16² + 1*16³ = 5804₁₀
5804₁₀ = 0*2⁰ + 0*2¹ + 1*2² + 1*2³ + 0*2⁴ + 1*2⁵ + 0*2⁶ + 1*2⁷ + 0*2⁸ + 1*2⁹ + 1*2¹⁰ + 0*2¹¹ + 1*2¹² = 1011010101100₂
11101₂ = 1*2⁰ + 0*2¹ + 1*2² + 1*2³ + 1*2⁴ = 29₁₀
110₂ = 0*2⁰ + 1*2¹ + 1*2² = 6₁₀
174₁₀ = 0*2⁰ + 1*2¹ + 1*2² + 1*2³ + 0*2⁴ + 1*2⁵ + 0*2⁶ + 1*2⁷ = 10101110₂
1011110₂ = 0*2⁰ + 1*2¹ + 1*2² + 1*2³ + 1*2⁴ + 0*2⁵ + 1*2⁶ = 94₁₀
101₂ = 1*2⁰ + 0*2¹ + 1*2² = 5₁₀
89₁₀ = 1*2⁰ + 0*2¹ + 0*2² + 1*2³ + 1*2⁴ + 0*2⁵ + 1*2⁶ = 1011001₂
1001₂ = 1*2⁰ + 0*2¹ + 0*2² + 1*2³ = 9₁₀
1010₂ = 0*2⁰ + 1*2¹ + 0*2² + 1*2³ = 10₁₀
19₁₀ = 1*2⁰ + 1*2¹ + 0*2² + 0*2³ + 1*2⁴ = 10011₂
const
n = 10;
m = 10;
var
i, j: integer;
a, b: array[1..n, 1..m] of integer;
f: boolean;
begin
for i := 1 to n do
begin
for j := 1 to m do
begin
a[i, j] := random(50);
write(a[i, j]:3, ' ');
end;
writeln;
end;
writeln;
for i := 1 to n do
begin
f := false;
for j := 1 to m do
begin
if not f and (a[i, j] mod 2 = 1) then begin
a[i, j] := 2 * a[i, j];
f := true;
end;
write(a[i, j]:3, ' ');
end;
writeln;
end;
end.