Home > Net >  In array (vector) of numbers find two numbers, product of which is the biggest. Using nested loops i
In array (vector) of numbers find two numbers, product of which is the biggest. Using nested loops i

Time:03-18

I have vector array.
user inputs some integer values in it.
For instance vector array can be like this:
array = [1, 2, 3, 4, 5, 333, 123, 534, 1, 3, 0, -12, -11]
How to find pair of numbers in this vector the product of which is the biggest? Do not use nested loops (loop in loop), it is forbidden. I don't need ready solution, i need just an idea. Thank you so much

  • Related