unit BubbleSortForm;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls, Menus;
type
IntegerArray=array of Integer;
type
TForm1 = class(TForm)
RichEdit1: TRichEdit;
Button2: TButton;
Function ToString(NumberArray:IntegerArray;Lens:Integer):String;
private
{ Private declarations }
Function SelectedSort(NumberArray:IntegerArray;Lens:Integer):IntegerArray;
public
{ Public declarations }
procedure Button2_Sort(Sender: TObject);
end;
var
Form1: TForm1;
NumberCount:Integer;
{SortArray:array of Integer;}
SortArray:IntegerArray;
implementation
{$R *.dfm}
function TForm1.ToString(NumberArray:IntegerArray;Lens:Integer):String;
var
Count:Integer;
Str:String;
begin
Str:='';
FOR Count:=0 TO lens-1 DO
BEGIN
Str:=Str+IntToStr(NumberArray[Count]);
END;
Result:=Str;
end;
fun
Delphi选择排序
最新推荐文章于 2021-07-08 18:27:02 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)