My teacher said this program doesn't exactly follow the instructions but would not tell me why. Can anyone help out?
Create a program called ArrayNums that calls a void function to create a sequential file for output called arrayNums. It should be put into a for loop using the random number generator to generate 10 integer numbers.
Create an integer array called intArray and pass it to a void function called fillTheArray. In this void function open the arrayNums file as input and read the numbers into the array.
Create another void function called totalTheNums where you will display and total up the numbers. In this module, display the numbers and then after the loop is complete, display the total.