summaryrefslogtreecommitdiff
path: root/fpcdocs/mathex/ex1.pp
blob: e2a85d63184d6f8557f894eaae9c1e4964a832db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Program Example1;

{ Program to demonstrate the arccos function. }

Uses math;

  Procedure WriteRadDeg(X : float);

  begin
    Writeln(X:8:5,' rad = ',radtodeg(x):8:5,' degrees.')
  end;

begin
  WriteRadDeg (arccos(1));
  WriteRadDeg (arccos(sqrt(3)/2));
  WriteRadDeg (arccos(sqrt(2)/2));
  WriteRadDeg (arccos(1/2));
  WriteRadDeg (arccos(0));
  WriteRadDeg (arccos(-1));
end.