Question: Write a program that will combine two integer arrays into one larger array and remove any duplicate values. Prompt the user for a number
Write a program that will combine two integer arrays into one larger array and remove any duplicate values. Prompt the user for a number N, (N will be a positive integer greater than 1). Create two arrays each with N elements. Populate both arrays with random numbers between 0 and 500. Combine the two arrays into a third array making sure that only distinct values are added. I.e. if the number '65' exists in both arrays, only one instance of it will be added to the third array. Test your program with an N value of: 10 25 50 Input: N: 25 Output: The contents of the final array, one number per line. Bonus challenge (optional): Sort the final array using any method other than the array.sort () method.
Step by Step Solution
3.35 Rating (155 Votes )
There are 3 Steps involved in it
Heres a Python program that combines two integer arrays into one larger array and r... View full answer
Get step-by-step solutions from verified subject matter experts
