
17.06.2009, 15:17
|
Прохожий
|
|
Регистрация: 17.06.2009
Сообщения: 9
Репутация: 10
|
|
Код:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
ComboBox1: TComboBox;
Button1: TButton;
Button2: TButton;
Label1: TLabel;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1; x1: set of byte;
y1:set of byte;
i,j,k,n:byte;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
include(x1,combobox1.itemindex);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
x1:=[1..255];
k:=0;
for i:=1 to n do
if (x1[i] mod 2<>1) and (x1[i] mod 17) then
begin
x[i]:=inc(k);
for j:=1 to k do
y1:=x1;
end;
label1.caption:=inttostr(y1[i]);
end;
end.
писал я такой вот код... другого ничего придумать не могу =(
|