Question: Question 7: Write a program in Java to store 10 different numbers in Single Dimensional Array, split the array into two separate arrays. One arrays

 Question 7: Write a program in Java to store 10 different

Question 7: Write a program in Java to store 10 different numbers in Single Dimensional Array, split the array into two separate arrays. One arrays contains all prime numbers in ascending order while the other array contains all the even numbers in descending order.( 2 should be grouped with prime numbers and while inserting a number in the array insert at it appropriate location according to its value) SAMPLE INPUT: 130,32,54,2,42,87,19,176,199,31 OUTPUT: First Array : 2,19,31,199 Second Array: 176,130,54,42,32

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!