Var ar1:array[1..10] of integer; ar2:array[1..10] of integer; i:integer; begin; randomize; writeln('+ Array'); for i:=1 to 10 do begin; ar1[i]:=random(1,10); write(ar1[i]:4); end; writeln; writeln('- Array'); for i:=1 to 10 do begin; ar2[i]:=random(-10,-1); write(ar2[i]:4); end; writeln; writeln('+'); for i:=1 to 10 do write(ar1[i]+ar2[i]:4); writeln; writeln('-'); for i:=1 to 10 do write(ar1[i]-ar2[i]:4); writeln; writeln('*'); for i:=1 to 10 do write(ar1[i]*ar2[i]:4); end.
ar2:array[1..10] of integer;
i:integer;
begin;
randomize;
writeln('+ Array');
for i:=1 to 10 do
begin;
ar1[i]:=random(1,10);
write(ar1[i]:4);
end;
writeln;
writeln('- Array');
for i:=1 to 10 do
begin;
ar2[i]:=random(-10,-1);
write(ar2[i]:4);
end;
writeln;
writeln('+');
for i:=1 to 10 do
write(ar1[i]+ar2[i]:4);
writeln;
writeln('-');
for i:=1 to 10 do
write(ar1[i]-ar2[i]:4);
writeln;
writeln('*');
for i:=1 to 10 do
write(ar1[i]*ar2[i]:4);
end.