reset password
Author Message
alope415
Posts: 12
Posted 22:52 Nov 18, 2016 |

One of the requirements for the problem is:

You are only allowed to read the file one time.

What does this exactly mean?

cgome106
Posts: 19
Posted 23:10 Nov 18, 2016 |

I believe this means you are only allowed to have one instance where your program gathers the data inside the file. I think it has to do with the fact that the first number will be the amount of numbers in the file, whereas the values that follow are the values you must test.

kknaur
Posts: 540
Posted 08:09 Nov 19, 2016 |

You are only allowed to open the file and read the data into your program once.  This will force you to properly use an array to store the data for the subsequent processing in the rest of the program.