Write a program to input two arrays of size 10 and merge first all even numbers from an array and then all odd numbers in new array.
Answers
Answered by
0
Answer:
abe tati dhek le marunga
Answered by
1
Answer:
Input = {12, 34, 45, 9, 8, 90, 3}
Output = {12, 34, 8, 90, 45, 9, 3}
In the output, the order of numbers can be changed, i.e., in the above example, 34 can come before 12 and 3 can come before 9.
Recommended: Please solve it on “PRACTICE ” first, before moving on to the solution.
The problem is very similar to our old post Segregate 0s and 1s in an array, and both of these problems are variation of famous Dutch national flag problem.
Similar questions