Create a program Arrays with an array containing 100 random integers from 1-100. Use a for
Question:
Create a program Arrays with an array containing 100 random integers from 1-100.
· Use a for loop to generate and store random numbers in the array. Use the Secure Random class to generate the random numbers.
· Sort the array. Use the bubble sort method below to sort the array in ascending order (low to high).
· Display the sorted array in right-aligned columns with ten numbers to a line.
· Determine how many duplicates there are and display each duplicated number and the count. Create a duplicates array to hold the count of each random number. Hint: array size should be 101.
· Determine all numbers from 1-100 that are missing from the array of random numbers and display them in right-aligned columns five numbers to a line.
· Use the command prompt window (terminal) for your program.
Applied Statistics in Business and Economics
ISBN: 978-0073521480
4th edition
Authors: David Doane, Lori Seward