Var r:array[1..100,1..100] of integer;i,j,n,k,sum:integer; p:double; b:array[1..30]of integer;beginp:=1;randomize;write('Введите n: ');readln(n); writeln('Исходная матрица: ');for i:=1 to n dobeginfor j:=1 to n dobeginr[i,j]:=random(10)-5;write(r[i,j]:4);end;writeln;end; writeln;for i:=1 to n dobeginfor j:=1 to n dobeginif i>=j then beginwrite(r[i,j]:4);if r[i,j]> 0 then begin k:= k + 1; p:= p * r[i,j]; b[k]:= r[i,j]; end;end elsewrite(' ':4);end;writeln;end;writeln('p = ', p);writeln(b);end.
var ar: array[0..3] of integer; digits: array[0..9] of integer; out: array[1..4, 1..7]of integer;
begin for var i := 0 to 9 do digits[i] := 0; var sum := 0; for var i := 1 to 2 do begin out[i][1] := 1053; out[i][2] := 1077; out[i][3] := 1074; out[i][4] := 1077; out[i][5] := 1088; out[i][6] := 1085; out[i][7] := 1086; end; out[4][1] := 1053; out[4][2] := 1077; out[4][3] := 1074; out[4][4] := 1077; out[4][5] := 1088; out[4][6] := 1085; out[4][7] := 1086;
out[3][1] := 1042; out[3][2] := 1077; out[3][3] := 1088; out[3][4] := 1085; out[3][5] := 1086; out[3][6] := 160; out[3][7] := 160; var num := readinteger('Введите четырехзначное число:'); ar[3] := num mod 10; ar[2] := num div 10 mod 10; ar[1] := num div 100 mod 10; ar[0] := num div 1000; for var i := 0 to 3 do digits[ar[i]] += 1; for var i := 0 to 9 do try sum += digits[i] div digits[i]; except on System.DivideByZeroException do end; for var i := 1 to 7 do write(chr(out[sum][i])); end.
writeln('Исходная матрица: ');for i:=1 to n dobeginfor j:=1 to n dobeginr[i,j]:=random(10)-5;write(r[i,j]:4);end;writeln;end;
writeln;for i:=1 to n dobeginfor j:=1 to n dobeginif i>=j then beginwrite(r[i,j]:4);if r[i,j]> 0 then begin k:= k + 1; p:= p * r[i,j]; b[k]:= r[i,j]; end;end elsewrite(' ':4);end;writeln;end;writeln('p = ', p);writeln(b);end.
var ar: array[0..3] of integer;
digits: array[0..9] of integer;
out: array[1..4, 1..7]of integer;
begin
for var i := 0 to 9 do
digits[i] := 0;
var sum := 0;
for var i := 1 to 2 do
begin
out[i][1] := 1053;
out[i][2] := 1077;
out[i][3] := 1074;
out[i][4] := 1077;
out[i][5] := 1088;
out[i][6] := 1085;
out[i][7] := 1086;
end;
out[4][1] := 1053;
out[4][2] := 1077;
out[4][3] := 1074;
out[4][4] := 1077;
out[4][5] := 1088;
out[4][6] := 1085;
out[4][7] := 1086;
out[3][1] := 1042;
out[3][2] := 1077;
out[3][3] := 1088;
out[3][4] := 1085;
out[3][5] := 1086;
out[3][6] := 160;
out[3][7] := 160;
var num := readinteger('Введите четырехзначное число:');
ar[3] := num mod 10;
ar[2] := num div 10 mod 10;
ar[1] := num div 100 mod 10;
ar[0] := num div 1000;
for var i := 0 to 3 do
digits[ar[i]] += 1;
for var i := 0 to 9 do
try
sum += digits[i] div digits[i];
except
on System.DivideByZeroException do
end;
for var i := 1 to 7 do
write(chr(out[sum][i]));
end.