Uses crt; var n,i,min,ind:integer; a:array[1..100] of integer; begin writeln('Input "n" and elements of array: '); read(n); read(a[1]); min:=a[1]; ind:=1; for i:=2 to n do begin read(a[i]); if a[i]<min then begin min:=a[i]; ind:=i; end; end; for i:=1 to ind-1 do write(a[i],' '); end.
Uses crt; const N=5; var a: array [1..N] of integer; x,min:integer; begin for x:=1 to N do begin write('a[',x,']:'); readln(a[x]); end; min:=1; for x:=1 to N do if a[x]<a[min] then min:=x; writeln; for x:=1 to min-1 do writeln('a[',x,']:',a[x]); end.
var n,i,min,ind:integer;
a:array[1..100] of integer;
begin
writeln('Input "n" and elements of array: ');
read(n);
read(a[1]);
min:=a[1];
ind:=1;
for i:=2 to n do
begin
read(a[i]);
if a[i]<min then
begin
min:=a[i];
ind:=i;
end;
end;
for i:=1 to ind-1 do
write(a[i],' ');
end.
const N=5;
var a: array [1..N] of integer;
x,min:integer;
begin
for x:=1 to N do
begin
write('a[',x,']:');
readln(a[x]);
end;
min:=1;
for x:=1 to N do
if a[x]<a[min] then min:=x;
writeln;
for x:=1 to min-1 do
writeln('a[',x,']:',a[x]);
end.