Subscribe

RSS Feed (xml)

Powered By

Skin Design:
Free Blogger Skins

Powered by Blogger

星期四, 10月 18, 2007

很無聊時學寫Power函數


function power(base, n : integer) : int64;
var
i : integer;
t : int64;
begin
t := 1;
for i := 1 to n do
t := t * base;
power := t;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
showmessage(inttostr(power(4, 3)));
end;

沒有留言: