Assignment 4

100 points

Overview

In this assignment, you will write a program that will read integers from a file of 80-byte records, with zero or more numbers per record, and store the integers in a table.

Read the file and process the integers on each line. Store each one in the table. The table may or may not be entirely full. Store the address of the first entry not in use.

To verify the loading of the table, print out the entire table with 7 numbers per line. The last line may not have as many as 7.

After that, print a list of all of the even integers with 5 numbers per line. (An integer M is even if the remainder of dividing M by 2 is 0.) The last line may not have as many as 5 numbers on it so part of it may be blank.

We will use internal subroutines to structure this program. (See the instructions listed below.)


Input

The input to the program will be a file with an unknown number of records. Each record contains zero or more integers, separated by spaces.

Use the following JCL statement to specify the input file:

     //FT05F001  DD  DSN=KC02314.SPRING20.CSCI360.HW4DATA,DISP=SHR


Internal Subroutines

You will need several internal subroutines:

There are several requirements for using an internal subroutine:


Assorted Requirements and Notes