Program JolieWErnAje; uses crt; const n=10; var a:array[1..n,1..n] of integer; i,j: integer; tp: integer; begin writeln('*** alphaues is thinking... ***'); writeln('*** OK ***'); writeln(); tp:=1; randomize; for i:=1 to n do begin for j:=1 to n do begin a[i,j]:= random(20)+1; {заполняем массив} write(a[i,j]:4); if a[i,j] mod 3 = 0 then tp:=tp*a[i,j]; end; writeln(); end; writeln(); writeln('Произведение элементов, кратных 3, равно ',tp) end.
Program JolieWErnAje;
uses crt;
const n=10;
var
a:array[1..n,1..n] of integer;
i,j: integer;
tp: integer;
begin
writeln('*** alphaues is thinking... ***');
writeln('*** OK ***');
writeln();
tp:=1;
randomize;
for i:=1 to n do
begin
for j:=1 to n do
begin
a[i,j]:= random(20)+1; {заполняем массив}
write(a[i,j]:4);
if a[i,j] mod 3 = 0 then tp:=tp*a[i,j];
end;
writeln();
end;
writeln();
writeln('Произведение элементов, кратных 3, равно ',tp)
end.