Copyright © – Sudharsan Iyengar
CS – 234 Lab 11 4/15/25
Arrays, Loops, and Sorting
Write an application that generates 1000 random numbers in the range 1 – 10000 and stores them in an array of integers.
Then:
1. Finds (Selects) the smallest number and swaps it with the value at location 0
2. Finds the next smallest number and swaps it with the value at location 1
3. Finds the next smallest number and swaps it with the value at location 2
4. Repeats this until all the values in the array is sorted.
Write a GUI application that takes the name of a file in a text field and then output the smallest value in the file.