home *** CD-ROM | disk | FTP | other *** search
- (* Chapter 3 - Programming exercise 1 *)
- program A_Little_Math;
-
- var Index, Count : integer;
- Stuff, Thing : real;
-
- begin
- Index := 12;
- Count := (Index + 4) * (Index - 3);
- Writeln('The value of count is now',Count:5);
-
- Stuff := 13.42;
- Thing := ((Stuff * Stuff) - 2.456) / (Stuff + 1.3462);
- Writeln('The value of thing is now',Thing:10:3);
- end.
-
-
-
-
- { Result of execution
-
- The value of count is now 144
- The value of thing is now 12.030
-
- }
-