const
n=5;
var
a : array [1..n] of integer;
i, s : integer;
begin
randomize;
writeln('Введите число');
read(s);
writeln('Массив:');
for i:=1 to n do
a[i]:=random(10)+1;
write(a[i]:4);
end;
writeln;
writeln('Новый массив:');
if a[i]<s then
a[i]:=0;
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
const
n=5;
var
a : array [1..n] of integer;
i, s : integer;
begin
randomize;
writeln('Введите число');
read(s);
writeln('Массив:');
for i:=1 to n do
begin
a[i]:=random(10)+1;
write(a[i]:4);
end;
writeln;
writeln('Новый массив:');
for i:=1 to n do
if a[i]<s then
a[i]:=0;
for i:=1 to n do
write(a[i]:4);
end.