You can run something like this:
int numOfLines; //stores num of lines that will be inputted
Scanner reader = new Scanner(System.in); //assuming you already imported before this
numOfLines = reader.nextInt(); //captures 1st user inputted value
int[] nums = new int[numOfLines]; //creates array object to captures all further values
for (int i = 0;i<numOfLines-1;i++){
nums[i] = reader.nextInt(); //captures values and stores in Array nums
}
Hope this can give you at least an idea of what to do. This will allow you to then afterwards calculate the multiplied values.
10
solved Write a program that prints the multiplication of two selected numbers from a line [closed]