Bradley C.

asked • 04/18/22

Java help the full question is below

Write a program that reads a list of integers, and outputs the two smallest integers in the list, in ascending order. The input begins with an integer indicating the number of integers that follow. You can assume that the list will have at least 2 integers and fewer than 20 integers.

Ex: If the input is:

5 10 5 3 21 2

the output is:

2 3

To achieve the above, first read the integers into an array.


1 Expert Answer

By:

Donald W. answered • 04/18/22

Tutor
5.0 (214)

Senior Software Engineer with over 25 years of industry experience

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.