suan_hao1.pas

来自「职工信息管理系统的源代码」· PAS 代码 · 共 59 行

PAS
59
字号
unit suan_hao1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Buttons;

type
  TForm1 = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    Label6: TLabel;
    Label7: TLabel;
    Button1: TSpeedButton;
    procedure Button1Click(Sender: TObject);
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}
 
procedure TForm1.Button1Click(Sender: TObject);
var ser:array [1..1000] of integer;
i,n:integer;
begin
n:=1;
for i:=10000 to 99999 do
begin
if (frac(i/17)=0) and (frac(i/33)=0)then
begin
ser[n]:=i;
n:=n+1;
end;
end;
label4.Caption:=inttostr(ser[random(n)]);
label5.Caption:=inttostr(ser[random(n)]);
label6.Caption:=inttostr(ser[random(n)]);
label7.Caption:=inttostr(ser[random(n)]);
end;
procedure TForm1.FormShow(Sender: TObject);
begin
button1.Click;
button1.Click;
end;

end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?