Question: 2 C ) Given a 1 D array of integers, perform the following task: Task - 1 : Identify 2 integers in the given 1

2C) Given a 1D array of integers, perform the following task:
Task-1: Identify 2 integers in the given 1D array for which the product is the maximum amongst all the products. Display the indices for these 2 integers.
Task-2: Identify 2 integers in the given 1D array for which the product is the minimum amongst all the products. Display the indices for these 2 integers.
Sample Result:
How many elements: 6
Enter 6 elements: 10,0,-6,0,5,-10
Max. product =60, max_prod_ind1=2, max_prod_ind2=5
Min. product =-100, min_prod_ind 1=0, min_prod_ind2=5
 2C) Given a 1D array of integers, perform the following task:

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 Databases Questions!