PRG/420: Java Programming – 8 LABS
(LAB 8) Two smallest numbers
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.
Hint: Make sure to initialize the second smallest and smallest integers properly.
attachment
LAB1OutputNumbers.png
attachment
LAB2MiddleItem.png
attachment
LAB4AdjustList.png
attachment
LAB3OutoutValuesBelow.png
attachment
LAB5WordFrequencies.png
attachment
LAB6ContainstheCharact
Do you need a similar assignment written for you from scratch? We have qualified writers to help you.
You can rest assured of an A+ quality paper that is plagiarism free. Order now for a FREE first Assignment!
Use Discount Code "FREE" for a 100% Discount!
NB: We do not resell papers. Upon ordering, we write an original paper exclusively for you.