var n, i: integer; B: array [1..30] of integer;begin Randomize; n := 1; for i := 1 to 30 do begin B[i] := Random(100); Write(B[i], ' '); if B[i]<B[n] then n := i; end; Writeln; Writeln('Номер: ', n); Write('Элемент: ', B[n]); end.
PascalABC.NET:
begin var B := ArrRandom(30, -99, 99); var n := B.IndexMin; B.Println; Println('Номер:', n+1); Print('Элемент:', B[n])end.
PascalABC.NET:
begin var B := ArrRandom(30, -99, 99); var n := B.IndexMin; B.Println; Println('Номер:', n+1); Print('Элемент:', B[n])end.Пример работы: