Homework #  4September 20, 2005

Part I

 

Write a very short bit of FORTRAN code which determines (and outputs something that proves it) whether .AND.  has precedence over  .OR. ,  .OR.  has precedence over .AND. or it is left to right dependent.  

 

Your program should have a heading and four (4) descriptions :  purpose, input, output, and general comments. 

 

Deliverable:  Print out of your program AND print out of the result of running it (i.e. DOS screen capture).

 

 

Part II

 

Write a very simple Pascal program which obtains three integers from the user,  echoes them back to the user,  and finds the sum and average of the three integers and prints them out with labels. 

 

Your program should: use meaningful variables names, avoid initializing variables that don’t need to be initialized, include descriptive comments about the Pascal language. Your program does not have to handle erroneous input.   As always your program should have a heading and four (4) descriptions:  purpose, input, output, and general comments. 

 

Deliverable:  Print out of your program  AND print out of the result of running it with some test data.