home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / PASANS.ZIP / CH03_1.PAS < prev    next >
Pascal/Delphi Source File  |  1991-02-04  |  514b  |  26 lines

  1.                             (* Chapter 3 - Programming exercise 1 *)
  2. program A_Little_Math;
  3.  
  4. var Index, Count : integer;
  5.     Stuff, Thing : real;
  6.  
  7. begin
  8.    Index := 12;
  9.    Count := (Index + 4) * (Index - 3);
  10.    Writeln('The value of count is now',Count:5);
  11.  
  12.    Stuff := 13.42;
  13.    Thing := ((Stuff * Stuff) - 2.456) / (Stuff + 1.3462);
  14.    Writeln('The value of thing is now',Thing:10:3);
  15. end.
  16.  
  17.  
  18.  
  19.  
  20. { Result of execution
  21.  
  22. The value of count is now  144
  23. The value of thing is now    12.030
  24.  
  25. }
  26.