1)var a:array[1..3,1..3] of integer; b:array[1..3,1..3] of integer; c:array[1..3,1..3] of integer; i,j:integer; begin; writeln('A array:'); for i:=1 to 3 do begin; writeln; for j:=1 to 3 do begin; a[i,j]:=random(-10,10); write(a[i,j]:4); end; end; writeln; writeln('B array:'); for i:=1 to 3 do begin; writeln; for j:=1 to 3 do begin; b[i,j]:=random(-10,10); write(b[i,j]:4); end; end; writeln; writeln('C array:'); for i:=1 to 3 do begin; writeln; for j:=1 to 3 do begin; c[i,j]:=a[i,j]*b[i,j]; write(c[i,j]:4); end; end; end. 2)var a:array of array of integer; i,j,k,n,u:integer; begin; randomize; readln(n); setlength(a,n+1); for i:=1 to n do setlength(a[i],n+1); writeln('A array:'); for i:=1 to n do begin; writeln; for j:=1 to n do begin; a[i,j]:=random(-10,10); write(a[i,j]:4); end; end; for i:=1 to n do begin; for j:=1 to n do u+=a[i,j]; if u<0 then inc(k); u:=0; end; writeln; write('Result:',k); end.
ЛаринаЛощаков
12.01.2023
1)var a:array[1..3,1..3] of integer; b:array[1..3,1..3] of integer; c:array[1..3,1..3] of integer; i,j:integer; begin; writeln('A array:'); for i:=1 to 3 do begin; writeln; for j:=1 to 3 do begin; a[i,j]:=random(10)-10; write(a[i,j]:4); end; end; writeln; writeln('B array:'); for i:=1 to 3 do begin; writeln; for j:=1 to 3 do begin; b[i,j]:=random(-10,10); write(b[i,j]:4); end; end; writeln; writeln('C array:'); for i:=1 to 3 do begin; writeln; for j:=1 to 3 do begin; c[i,j]:=a[i,j]*b[i,j]; write(c[i,j]:4); end; end; end. 2)var a:array[1..1000,1..1000] of integer; i,j,k,n,u:integer; begin; randomize; readln(n); writeln('A array:'); for i:=1 to n do begin; writeln; for j:=1 to n do begin; a[i,j]:=random(10)-10; write(a[i,j]:4); end; end; for i:=1 to n do begin; for j:=1 to n do u+=a[i,j]; if u<0 then inc(k); u:=0; end; writeln; write('Result:',k); end.
Ответить на вопрос
Поделитесь своими знаниями, ответьте на вопрос:
Наведи розгалуження во время применение правил математики и украинского языка :)
b:array[1..3,1..3] of integer;
c:array[1..3,1..3] of integer;
i,j:integer;
begin;
writeln('A array:');
for i:=1 to 3 do
begin;
writeln;
for j:=1 to 3 do
begin;
a[i,j]:=random(-10,10);
write(a[i,j]:4);
end;
end;
writeln;
writeln('B array:');
for i:=1 to 3 do
begin;
writeln;
for j:=1 to 3 do
begin;
b[i,j]:=random(-10,10);
write(b[i,j]:4);
end;
end;
writeln;
writeln('C array:');
for i:=1 to 3 do
begin;
writeln;
for j:=1 to 3 do
begin;
c[i,j]:=a[i,j]*b[i,j];
write(c[i,j]:4);
end;
end;
end.
2)var a:array of array of integer;
i,j,k,n,u:integer;
begin;
randomize;
readln(n);
setlength(a,n+1);
for i:=1 to n do
setlength(a[i],n+1);
writeln('A array:');
for i:=1 to n do
begin;
writeln;
for j:=1 to n do
begin;
a[i,j]:=random(-10,10);
write(a[i,j]:4);
end;
end;
for i:=1 to n do
begin;
for j:=1 to n do
u+=a[i,j];
if u<0 then inc(k);
u:=0;
end;
writeln;
write('Result:',k);
end.