How to add the nth place of an output in a lambda sequence

So I needed to create program that gave me n amnt of random numbers out of a given range. Lets say it gives me 4 and 3 out the range

so the code result looks like this:

4 is the random number

3 is the random number

But i want to say

4 is the 'first' random number

3 is the 'second' random number

Scanner input = new Scanner(System.in);

System.out.print("Enter lower limit of the range:");

String lowerLimit = input.nextLine();

int min = Integer.parseInt(lowerLimit);

Scanner input1 = new Scanner(System.in);

System.out.print("Enter higher limit of the range:");

String higherLimit = input.nextLine();

int max = Integer.parseInt(higherLimit);

/*

*

*/

Scanner...

Read More »

By: StackOverFlow - 7 days ago

Related Posts