summaryrefslogtreecommitdiff
path: root/fpcdocs/mathex/ex34.pp
blob: 6c535e248141b20013326132a2e06093419a983e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Program Example34;

{ Program to demonstrate the power function. }

Uses Math;

procedure dopower(x,y : float);

begin
  writeln(x:8:6,'^',y:8:6,' = ',power(x,y):8:6)
end;

begin
  dopower(2,2);
  dopower(2,-2);
  dopower(2,0.0);
end.