home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / PROG / PASCAL / PASTUT24.ZIP / PTUTRSRC.ZIP / REALMATH.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1989-12-01  |  964 b   |  32 lines

  1.                                 (* Chapter 3 - Program 4 *)
  2. program Real_Math_Demo;
  3.  
  4. var A,B,C,D : real;
  5.  
  6. begin
  7.    A := 3.234;               {simply assigning a value}
  8.    B := A + 1.101;           {adding a constant}
  9.    C := A + B;               {summing two variables}
  10.    D := 4.234*A*B;           {multiplication}
  11.    D := 2.3/B;               {division}
  12.    D := A - B;               {subtraction}
  13.    D := (A + B)/(12.56-B);   {example of a multiple expression}
  14.                              {Pascal has no expression for
  15.                               raising a number to a power.
  16.                               It must be done with the log and
  17.                               exp functions}
  18.   {The trigonometric functions, log functions and others are
  19.    available as predefined routines.}
  20.  
  21.   {It will be left up to you to print out some of the above values}
  22. end.
  23.  
  24.  
  25.  
  26.  
  27. { Result of execution
  28.  
  29. (There is no output from this program )
  30.  
  31. }
  32.