Question: Write a java program that prints the product of two selected numbers from a line First line of input contains the number of lines to

Write a java program that prints the product of two selected numbers
from a line
First line of input contains the number of lines to follow
First number of each following line contains the number of integers
(n>=4 and n<=1000,) that follow in the line
Those n integers (each integer >=0; <=1000) follow till the end of the
line (separated by space). They can be stored (except the last two) in
an array using index numbers 1...n-2(but not necessary)
The last two integers x, y (x,y>=1 & x,y<=n-2) in the line is the index
(starting from 1) of the integers from the line to multiply

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!