Computer Science, asked by saakshisingh30mar200, 9 months ago

write a program to store 10 numbers in array and shift all even numbers to array E and all odd numbers to array O .Finally print the elements of both arrays. ​

Answers

Answered by shubhamrock67
0

Answer:

Java Program to Put Even & Odd Elements of an Array in 2 Separate Arrays

This is a Java Program to Put Even & Odd Elements of an Array in 2 Separate Arrays.

Enter size of array and then enter all the elements of that array. Now with the help of for loop and if condition we check whether its odd or not and hence print it accordingly.

Here is the source code of the Java Program to Put Even & Odd Elements of an Array in 2 Separate Arrays. The Java program is successfully compiled and run on a Windows system. The program output is also shown below.

Similar questions