排列组合算法程序

来源:百度知道 编辑:UC知道 时间:2024/05/06 04:23:35
用C。C++。asp。或者jsp。vb。随便一种语言。输出
1到33。33个数。从中选6个数。不重复。输出所有可能排列。不分顺序。
写出完成算法程序。附带注释。

unit Unit2;

interface

uses
Classes,ADODB,SysUtils,DB,ActiveX ;

type
AllNumber = class(TThread)
private
{ Private declarations }
protected
procedure Execute; override;
procedure ADOADDEdit(ado:TADOQuery;str:String);
end;

implementation

{ Important: Methods and properties of objects in visual components can only be
used in a method called using Synchronize, for example,

Synchronize(UpdateCaption);

and UpdateCaption could look like,

procedure AllNumber.UpdateCaption;
begin
Form1.Caption := 'Updated in a thread';
end; }

{ AllNumber }

procedure AllNumber.ADOADDEdit(ado: TADOQuery; str: String);
begin
ado.Close ;
ado.SQL.Clear ;
ado.SQL.Add(str) ;
ado.ExecSQL ;
end;

procedure AllNumber.Execute;
var
ado:TA