Сделал сортировку выбором: program sort;
uses crt;
CONST
n=10;
var mas:array [1..n] of string;
i,p,k:integer;
j:string;
begin
clrscr;
WriteLn ('Vvedite elementu masiva:');
for i:=1 to n do
ReadLn (mas[i]);
writeLn ('--------------------------------');
Write ('Vvedite P:');
Readln (p);
for i:=1 to p do
begin
for k:=i to (p-1) do
begin
j:=mas[i];
if (ord(j[0]))>(ord(mas[k+1][0])) then
begin
mas[i]:=mas[k+1];
mas[k+1]:=j;
end;
end;
Writeln (mas[i]);
end;
readkey;
end.