天
天真
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.Button1Click(Sender: TObject);
function ZHI(base,ci:integer):integer;
var i : integer;
begin
if ci=0 then
begin
result :=base;
exit;
end;
result:=1;
for i := 1 to ci do
begin
result:=result*16;
end;
result:= base*result;
end;
var s: string;
i,total : integer;
begin
total:=0;
s:=inttohex(ord('a'),2);
for i:= 1 to length(s) do
begin
total:= total+ZHI(strtoint(s),length(s)-i);
end;
showmessage(inttostr(total)+char(total));
end;
function ZHI(base,ci:integer):integer;
var i : integer;
begin
if ci=0 then
begin
result :=base;
exit;
end;
result:=1;
for i := 1 to ci do
begin
result:=result*16;
end;
result:= base*result;
end;
var s: string;
i,total : integer;
begin
total:=0;
s:=inttohex(ord('a'),2);
for i:= 1 to length(s) do
begin
total:= total+ZHI(strtoint(s),length(s)-i);
end;
showmessage(inttostr(total)+char(total));
end;