summaryrefslogtreecommitdiff
path: root/fpcdocs/mathex/ex2.pp
blob: f8144f6bc8e1baa1e5009b6bf823e939690f871a (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 arcsin function. }

Uses math;

  Procedure WriteRadDeg(X : float);

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

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