Question: Write a program that does the following steps 1 . Generate an array of 5 0 random integers from 0 to 9 9 . Call

Write a program that does the following steps 1. Generate an array of 50 random integers from 0 to 99. Call this array num1_arr 2. Generate another array of 50 random integers from 100 to 199. Call this array num2_arr 3. Write a void method called closestDist (int [] num1_arr, int[] num2_arr) that prints out the closest distance between the 2 arrays and the 2 numbers with one from each of the arrays You MUST use a nested for loops inside this method to find the closest distance. Do not use any built-in methods to sort the array. For example, here is a sample output The min distance between the 2 arrays =15 The 2 numbers are: 87 in the first array with index 9102 in the second array with index 1

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!