Количество информации = log(2)8 = 3 бита (8 = 2^3)
gabramova
12.09.2022
//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.
pannotolstova488
12.09.2022
// тестировалось на C#.Net Framework 4.5 using System;
class Program { static void Main() { int x1 = 2, y1 = 1; int x2 = 6, y2 = 5; int x3 = 10, y3 = 1;
var a = Distance(x2, y2, x3, y3); var b = Distance(x1, y1, x3, y3); var c = Distance(x2, y2, x1, y1);