Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a java program which prompts the user to enter integer 20 numbers between -999 and +999. The inputted data is collected in an array

Write a java program which prompts the user to enter integer 20 numbers between -999 and +999. The inputted data is collected in an array then is it divided into the following arrays: An array of all odd numbers, an array of all even numbers, an array or all positive numbers, an array of all negative numbers. Perform the following operations on the arrays: Find the difference between the highest and lowest positive number. Find the sum of all negative numbers. Display as per the user's request: 1. The orginial Array 2. The array of all odd numbers 3. The array of all even numbers. 4. The array of all positive numbers. 5. The array of all negative numbers. 6. The highest and lowest positive number and the value which represents the different between them. 7. The sum of all negative numbers. 8. Display all positive appearing in the positive array whose value is less than 50. 9. Display all even numbers in reverse order. 10. Display all 5 multiples (positive and negative)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

1 2 3 Data Base Techniques

Authors: Dick Andersen

1st Edition

0880223464, 978-0880223461

More Books

Students also viewed these Databases questions