You are on page 1of 1

Program for merging two arrays

Enter the no. of elements in First Array : 5


Enter the no. of elements in Second Array : 5

Enter the elements for First Array to descending order:


90
82
76
45
23

Enter the elements for the Second Array in ascending order:


45
53
67
87
99

Do you want to do?:


1. MergeAsc
2.MergeDesc
1

The resultant Array is: 23 45 53 67 76 82 87 90 99


Do you want to continue?(y/n):y

Enter the no. of elements for the First Array : 5

Enter the no .of elements for the Second Array : 5

Enter the elements for the First Array in descending order :


89
78
56
43
21

Enter the elements for the Second Array in ascending order:


12
24
46
78
99

Do you want to do?:


1. MergeAsc
2.MergeDesc
2

The Resutant Array is: 99 89 78 78 56 46 43 24 21 12


Do you want to continue?(y/n): n

You might also like