4.7 The 4 Labs4.5 Enter a PASCAL program4.6 Pascal program compile and run

4.6 Pascal program compile and run

Pascal is a programming language that was designed for teaching programming.
  1. Compile the PASCAL program (trip.pas) you created in Lab 4.5 The /LIST will create an optional listing file (trip.pas).
     
    gpc -o trip trip.pas
    
  2. If you have errors (probably, I asked you to leave in some problems), correct the original source (trip.pas from Lab 4.5 with the editor and go back to step 1.
  3. Execute the trip file and answer the prompts with the following data:
     
    trip
     
    Distance:           200 
    Average speed:      55 
    Miles per gallon:   20 
    Cost per gallon:    1.29
    
  4. Printout your run. To do this use the following commands:
     
    trip | tee temp
    lpr temp
    
On the print out from step print the following:
Your-Name
Lab 4.6: Pascal compile and run
TABER CIS135
Place the lab in the instructor hand-in box in BUS R6E, the "terminal room".
Instructor: ltaber@pima.edu ** My new Home at GeoApps in Tucson ** The Pima College Site ** The Mad Dr. G.'s home page on phred.

4.7 The 4 Labs4.5 Enter a PASCAL program4.6 Pascal program compile and run