Just put it inside the the while loop:
while (reader.hasNext())
{
int min = Integer.parseInt(reader.next());
int max = Integer.parseInt(reader.next());
for(int x=min ;x <=max;...
Type: Posts; User: helloworld922
Just put it inside the the while loop:
while (reader.hasNext())
{
int min = Integer.parseInt(reader.next());
int max = Integer.parseInt(reader.next());
for(int x=min ;x <=max;...
the scanner.next() method reads in a "word" (aka, stuff separated by whitespaces).
So, the first call to next() would return "1", the second one would return "10", the third "20", and so on until...