Menu

(Solved) : Write C Program Reads 2 Arrays Numbers User Arr1 Arr2 Create Third Array Arr3 Concatenate Q37933860 . . .

. Write a C++ program that reads 2 arrays of numbersfrom a user (Arr1 and Arr2) and create third array
(Arr3) that concatenate the values of the first 2 arraysalternatively.
Hints:
The size of both Arr1 and Arr2 is equal.
Use dynamic arrays and no global variables.
Use the following functions:
void Concate_Alter(int *Arr1 , int *Arr2,int *Arr3, int Size)
void display(int *Arr ,int Size)
Sample Run:
5 //array size
1 2 3 4 5 //first array
6 7 8 9 10 //second array
1 6 2 7 3 8 4 9 5 10 //output array

4. Write a program that asks the user to enter size and dynamicarray. Create another dynamic array that
will be holding Perfect numbers only. Display MUST be in main
Use the following functions:
bool IsPerfect(int num);
void FillPrefectArr(int* OldArr,int Size,int* NewArr, int&NewSize);
Hint: Perfect number, a positive integer that is equal to the sumof its proper divisors. The smallest
perfect number is 6, which is the sum of 1, 2, and 3.
Sample Run:
Enter how many numbers you will enter: 10
Enter Array: 1 28 30 42 5 6 7 8 91 10
The new array: 28 6
Do you want to continue (y/n) ? : y
Enter how many numbers you will enter: 10

Expert Answer


Answer to Write C Program Reads 2 Arrays Numbers User Arr1 Arr2 Create Third Array Arr3 Concatenate Q37933860 . . .

OR