program maximum; const n = 10; var a:array [1..n] of integer; i,maxindex: integer; begin for i:=1 to n do write(i:2, ' '); writeln; randomize; a[1]:=10+random(90); write(a[1], ' '); maxindex:=1; for i:=2 to n do begin a[i]:=10+random(90); write(a[i], ' '); if a[maxindex] < a[i] then maxindex:=i; end; writeln; writeln('max: ', a[maxindex], '; sorszama: ', maxindex); readln; end.