ClosedLab10a author version 20141010 public class Closedlab10a import java util import java lang import java io class Ideone public static void main String args throws java lang Exception int num i j Scanner in new Scanner System in String s do System out println Please enter the number of digits to be stored s in nextLine num Integer parseInt s if num 0 System out println ERROR You must enter a non negative number of digits while num 0 if num 0 System out println No digits to store Goodbye else int arr new int 100 for i 0 i num i System out println Enter integer i s in nextLine arr i Integer parseInt s System out println Array before sorting System out println The contents of your array System out println Number of digits in array num System out println Digits in array for i 0 i num i System out print arr i System out println nArray after sorting for i 0 i num i for j i 1 j num j if arr i arr j arr i arr j arr i arr j arr i System out println Number of digits in array num System out println Digits in array for i 0 i num i System out print arr i
View Full Document