uses crt; var max, i , n,k : integer; m: array [1..100] of integer; begin randomize; max:= -99; readln (n); for i:=1 to n do m[i]:= random (30); for i:=1 to n do if m[i]>max then begin max:= m[i]; k:= i; end; for i:=1 to n do write (m[i],' '); writeln; writeln ('max = ',max,' nomer v table = ',k); readkey; end.
uses crt;
var
max, i , n,k : integer;
m: array [1..100] of integer;
begin
randomize;
max:= -99;
readln (n);
for i:=1 to n do
m[i]:= random (30);
for i:=1 to n do
if m[i]>max then begin max:= m[i]; k:= i; end;
for i:=1 to n do
write (m[i],' ');
writeln;
writeln ('max = ',max,' nomer v table = ',k);
readkey;
end.
program P1;
uses
crt;
type
TArray = array[1..1] of integer;
var
N,max : integer;
i,k : integer;
A : ^TArray;
begin
{$R-}
clrscr;
write('N = ');
read(N);
GetMem(A,N*sizeof(integer));
k := 1;
for i := 1 to N do
begin
write('Element ',i,' = ');
read(A^[i]);
if i = 1 then
max := A^[i];
if A^[i] > max then
begin
max := A^[i];
k := i;
end;
end;
writeln('');
writeln('Max = ',max);
writeln('Nomer: ',k);
readln;
readln;
freemem(A,N*sizeof(integer));
end.