const n=15;
var i:integer;
a:array[1..n] of integer;
begin
for i:=1 to n do
a[i]:=random(56)-22;
write(a[i]:3,' ')
end;
writeln;
if a[i]>0 then a[i]:=1;
end
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
const n=15;
var i:integer;
a:array[1..n] of integer;
begin
for i:=1 to n do
begin
a[i]:=random(56)-22;
write(a[i]:3,' ')
end;
writeln;
for i:=1 to n do
begin
if a[i]>0 then a[i]:=1;
write(a[i]:3,' ')
end
end.