I found the minimum value. But how to add a condition that the minimum value should not be a multiple of 6?
var a:array[1..20] of longint; i:longint; min: integer; begin randomize; for i:=1 to 20 do a[i]:=random(2001)-1001; min:=a[1]; for i:=1 to 10 do if a[i] < min then begin a[i]:=min; end; for i:=1 to 20 do begin writeln('a[' ,i,'] = ', a[i]); end; writeln('min= ', min); end.