Question: ENGR 40 ASSIGNMENT ONE DIMENSIONAL ARRAYS FORWARD/REVERSE Write a complete program that will read in up to 20 integers followed by a sentinel from an

 ENGR 40 ASSIGNMENT ONE DIMENSIONAL ARRAYS FORWARD/REVERSE Write a complete program

ENGR 40 ASSIGNMENT ONE DIMENSIONAL ARRAYS FORWARD/REVERSE Write a complete program that will read in up to 20 integers followed by a sentinel from an external data file. (Your program should have an integer array of size 21).The data file will have up to 21 values with the last value in the data file being 9999 (a sentinel value). The 9999 value signifies the end of valid data and is not considered a valid data value. Your program should write the valid data values (not including the 9999 sentinel) to the screen in the order that they were read and then in reverse order (see example below). Your program should not be written so that it pre-knows the number of data values in the data file. It should only presume to know that there will be less than or equal to 20 values, followed by the sentinel value 9999. Turn in the source code and one example run that uses a data file with more than 10 but less than 20 values in it. Example data file: Example output Forward: 23 65 12 65 12 14 14 87 87 Reverse: 87 14 12 65 23 ENGR 40 ASSIGNMENT ONE DIMENSIONAL ARRAYS FORWARD/REVERSE Write a complete program that will read in up to 20 integers followed by a sentinel from an external data file. (Your program should have an integer array of size 21).The data file will have up to 21 values with the last value in the data file being 9999 (a sentinel value). The 9999 value signifies the end of valid data and is not considered a valid data value. Your program should write the valid data values (not including the 9999 sentinel) to the screen in the order that they were read and then in reverse order (see example below). Your program should not be written so that it pre-knows the number of data values in the data file. It should only presume to know that there will be less than or equal to 20 values, followed by the sentinel value 9999. Turn in the source code and one example run that uses a data file with more than 10 but less than 20 values in it. Example data file: Example output Forward: 23 65 12 65 12 14 14 87 87 Reverse: 87 14 12 65 23

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!