program minchislo;
const
n=5;
var
a : array [1..n] of integer;
i,min: integer;
begin
randomize ;
for i:=1 to n do
a[i]:=random(1,100);
write(a[i]:4);
end;
writeln;
min:=1;
if a[i]<a[min] then
min:=i;
writeln('Минимальный элемент: ',a[min]);
a[min]:=0;
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
program minchislo;
const
n=5;
var
a : array [1..n] of integer;
i,min: integer;
begin
randomize ;
for i:=1 to n do
begin
a[i]:=random(1,100);
write(a[i]:4);
end;
writeln;
min:=1;
for i:=1 to n do
if a[i]<a[min] then
min:=i;
writeln('Минимальный элемент: ',a[min]);
for i:=1 to n do
a[min]:=0;
for i:=1 to n do
write(a[i]:4);
end.