Copyright  © – Sudharsan Iyengar

 

CS – 234                                 Lab 11                         11/20/24

 

Arrays, Loops, and Sorting

 

Write an application that generates 1000 random numbers in the range 10000 – 100000 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.