home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
progm
/
pascal2.zip
/
REALMATH.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1988-01-15
|
886b
|
24 lines
(* Chapter 3 - Program 4 *)
program Real_Math_Demo;
var A,B,C,D : real;
begin
A := 3.234; {simply assigning a value}
B := A + 1.101; {adding a constant}
C := A + B; {summing two variables}
D := 4.234*A*B; {multiplication}
D := 2.3/B; {division}
D := A - B; {subtraction}
D := (A + B)/(12.56-B); {example of a multiple expression}
{Pascal has no expression for
raising a number to a power.
It must be done with the log and
exp functions}
{The trigonometric functions, log functions and others are
available as predefined routines.}
{It will be left up to you to print out some of the above values}
end.