Question: 1. Write a program that reads in two arrays (a1 and a2) of numbers and creates a new array (a3) of numbers such that the

1. Write a program that reads in two arrays (a1 and a2) of numbers and creates a new array (a3) of numbers such that the new array contains all the unique numbers of a1 and a2. Assume the input array elements are unique elements. In the main function, ask the user to enter the length of each array, declare and reads in the numbers for each array, and calculate and display the output array.

Example input/output #1: Enter the length of array 1: 5 Enter the elements of the array: 8 4 1 3 9 Enter the length of array 2: 3 Enter the elements of the array: 5 4 8

Output array: 8 4 1 3 9 5

Example input/output #2: Enter the length of array 1: 4 Enter the elements of the array: 3 4 1 7 Enter the length of array 2: 2 Enter the elements of the array: 6 9

Output array: 3 4 1 7 6 9

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!