pascalabcnet/TestSuite/CompilationSamples/Fun2.pas
Бондарев Иван e6e67c193c initial commit
2015-05-14 21:35:07 +02:00

17 lines
251 B
ObjectPascal

// Ôóíêöèÿ Power
function Power(x: real; n: integer): real;
begin
Result := 1;
for var i:=1 to n do
Result *= x;
end;
var
x: real;
n: integer;
begin
x := 2; n := 5;
writelnFormat('{0} â ñòåïåíè {1} = {2}',x,n,Power(x,n));
end.