Dear all
Please help me to solve one problem. For example i wana multiplay two numbers like this X^Y. 2^3=8 or 5^4=625
Plese give me a code.
Thanks
function Power(const Base, Exponent: Extended): Extended;
function multiply (base: real; power: integer): real;
begin
if power<0 then
begin
base:=1/base;
power:=-power;
end;
if power=0 then Result:=1
else Result:=base*multiply(base, power-1);
end;
Users browsing this forum: No registered users and 20 guests