на паскаль)
var
a:array[1..15] of integer;
b:array[1..15] of integer;
i:integer;
Begin
randomize;
for i:=1 to 15 do Begin
a[i]:=random(61)-30;
if a[i]<=0 then b[i]:=abs(a[i])
else b[i]:=a[i]-a[i]*2;
end;
for i:=1 to 15 do Write(a[i],' ');
Writeln();
for i:=1 to 15 do Write(b[i],' ');
end.
на паскаль)
var
a:array[1..15] of integer;
b:array[1..15] of integer;
i:integer;
Begin
randomize;
for i:=1 to 15 do Begin
a[i]:=random(61)-30;
if a[i]<=0 then b[i]:=abs(a[i])
else b[i]:=a[i]-a[i]*2;
end;
for i:=1 to 15 do Write(a[i],' ');
Writeln();
for i:=1 to 15 do Write(b[i],' ');
end.