Const CSize= 10;
type Tmass= record
mBrand: string;
mYear: integer;
mColor: string;
mDate: string;
mPrice: integer;
end;
TCar= array[1..CSize] of Tmass;
var Car: TCar;
procedure BubbleSort(var arg: TCar);
var i,j: integer;
t: Tmass;
begin
for i:=1 to CSize-1 do
for j:=1 to CSize-1 do
if arg[j]. mBrand > arg[j+1]. mBrand then begin
t:= arg[j];
arg[j]:= arg[j+1];
arg[j+1]:= t;
end;
end;
var i: integer;
begin
for i:=1 to CSize do begin
Write('Brand: '); Readln(Car[i]. mBrand);
Write('Year: '); Readln(Car[i]. mYear);
Write('Color: '); Readln(Car[i]. mColor);
Write('Date: '); Readln(Car[i]. mDate);
Write('Price: '); Readln(Car[i]. mPrice);
end;
BubbleSort(Car);
Writeln(' Brand Year Color Date Price');
for i:=1 to CSize do
Writeln(Car[i]. mBrand:2,Car[i]. mYear: (14-Length(Car[i]. mBrand)),
Car[i]. mColor:10,Car[i]. mDate:14,Car[i]. mPrice:10);
Readln;
end.