$\color{green}{\text{Program BTT;}}$
$\color{red}{\text{Uses crt;}}$
$\color{blue}{\text{Var A: array[1..1000] of longint;}}$
$\color{yellow}{\text{n,i,max: longint;}}$
$\color{green}{\text{Begin}}$
$\color{red}{\text{ Clrscr;}}$
$\color{yellow}{\text{ Write('Nhap n: '); Readln(n);}}$
$\color{red}{\text{ max:=0;}}$
$\color{blue}{\text{ For i:=1 to n do}}$
$\color{green}{\text{ Begin}}$
$\color{pink}{\text{ Write('A[',i,'] = ');}}$
$\color{blue}{\text{ Readln(A[i]);}}$
$\color{red}{\text{ If A[i]>max then max:=A[i];}}$
$\color{green}{\text{ End;}}$
$\color{blue}{\text{ Write('Max = ',max);}}$
$\color{yellow}{\text{ Readln}}$
$\color{blue}{\text{End.}}$