Part 1: 1. Write a Java program called Numbers1 that reads 10 integer numbers from the user and displays them in reverse order to the way they were scanned. Hint: Use an array to store the 10 integers. 2. Generalize the above program, so it reads any number of integer numbers (instead of 10 integer numbers). Hint: promote the user to enter the size (length) of the array. Part 2: Write a Java program called Numbers2 that that reads 10 real (double) numbers from the user, and then it should find and display the average of the array elements, the largest number and the smallest number. Hint: Use an array to store the 10 numbers.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter10: Classes And Data Abstraction
Section: Chapter Questions
Problem 22PE
icon
Related questions
Question

Part 1:


1. Write a Java program called Numbers1 that reads 10 integer numbers from the user and displays
them in reverse order to the way they were scanned.
Hint: Use an array to store the 10 integers.
2. Generalize the above program, so it reads any number of integer numbers (instead of 10 integer
numbers).
Hint: promote the user to enter the size (length) of the array.


Part 2:


Write a Java program called Numbers2 that that reads 10 real (double) numbers from the user, and then
it should find and display the average of the array elements, the largest number and the smallest
number.
Hint: Use an array to store the 10 numbers.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 6 steps with 6 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT