for j : = i+1 to Len do
if Maxvect (Vector) [j] < Min then
begin
Min : = MaxVect (Vector) [j];
Imin : = j
end;
MaxVect (Vector) [Imin] : = MaxVect (Vector) [i];
MaxVect (Vector) [i] : = Min;
end;
end;
{-------------------------------------------------------------------}
procedure InpVector (var Vector; Len : Word; T : String);
var i : Word;
begin
ClrScr;
Writeln (Элементларни ќуйидаги турда киритинг, Len : 3, Т, : );
for i : = 1 to Len do Read (MaxVect (Vector) [i] );
Readln;
end;
{----------------------------------------------------------------------}
procedure PrintVector (var Vector; Len : Word);
var
i : Word;
begin
Writeln (Сараланган массив:);
for i : = 1 to Len do Write (MaxVect (Vector) [i] : 8);
Writeln;
Writeln (Enterни босинг … );
Readln;
end;
begin
InpVector (ByteVector, l, Byte);
SortVector (ByteVector, l);
PrintVector (ByteVector, l);
{----------------------------------------------------------------------}
InpVector (Vector100, m, 1 .. 100);
SortVector (Vector100, m);
PrintVector (Vector100, m);
{------------------------------------------------------------------------}
ClrScr;
Writeln (Char турдаги элементларни киритинг: n:3);
for i : = 1 to n do Read (CharVector [i]);
Readln;
SortVector (CharVector, n);
Writeln (Сараланган массив:);
for i : = 1 to n do Write (CharVector [i] : 8);
Writeln;
Writeln (Enterни босинг … );
Readln;
end.
10.4.5. Очиќ параметр-массивлар
Процедура сарлавћасида очиќ параметр-массивлар ќуйидагича баён этилади:
Do'stlaringiz bilan baham: |