unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs;type TForm1 = class(TForm) procedure FormCreate(Sender: TObject);
private { Private declarations } public { Public declarations } end;
var Form1: TForm1;implementation{$R *.dfm}Function fmt(n:integer):string;var j:integer;
begin
j:=length(inttostr
);
case j of 1:result:='00'+inttostr
;
2:result:='0'+inttostr
;
3:result:=inttostr
;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);var i:integer;
begin
for i:=1 to 100do
begin
showmessage(fmt(i));
end;
end;
end.