I have a text file containing the first 1000 prime numbers and I have written a method to read the data from said text file.
I would like to know how to use the data from this file and apply it to another method.
Something along the lines of:
read data from file;
use first eight numbers and apply to this method;
Any help would be appreciated.
Reading from file is simple, assuming you have one line per number –