procedure TForm1.Button1Click(Sender: TObject);
var
name,code,laden,tiger,str:string;
i,j:integer;
part:array[1..100]of char;
begin
name:=edit1.Text;
code:=edit2.Text;
laden:='i am Bin Laden';
tiger:='i am yi zhi lao hu';
if (length(name)<10) or (length(name)>16) then
exit;
if (length(code)<17) or (length(code)>22) then
exit;
name:=name+laden;
for i:=1 to 100 do
part[i]:='.';
for i:=1 to length(name) do
for j:=1 to length(tiger) do
part[i+j]:=chr(((ord(name[i])*ord(code[j]))mod 26)+65);
str:='';
for i:=1 to length(code) do
str:=part[i+6]+str;
if str=code then
Application.MessageBox('注册成功!请联系我!QQ:609841314','恭喜你',MB_ICONINFORMATION+MB_OK);
end;