Project 4 will do an analysis of some undetermined number of positive integers. You will report the number of positive integers, the largest positive integer (the maximum value), the smallest positive integer (the minimum value), the sum of all of the numbers, and their average (to 2 decimal places).
To eliminate the need to test the user's input for validity, I will be providing a data file for you to use as input for your program. This data file contains positive integers. The last value in the file is -1. This is the sentinel value that signals the program to stop getting integers as input.
To use the data file as input for your program, you will use unix redirection. By using redirection, we can have unix fill the stdin buffer from a data file, instead of from the keyboard. The scanf statement that you use in your program will look exactly the same as it would if you were getting your input from the keyboard. Since you will be getting the values in from a file, instead of from a user typing at the keyboard, you don't need to (or want to) prompt the user.
When you run your program, at the unix prompt you will give the following command:
Here is an example of what the data file might look like: