Procedure
Real Lab Procedure
- Creating a list variable "arr" to hold the numbers entered by user.
- Insert five elements into "arr".
- It stores the number of elements in the "arr" to the variable "size" for iteration.
- Assuming that current minimum value(min_index) is at location 0.
- Traverse the unsorted sub-list to find the minimum element in the list.
- While traversing, if any element smaller than "min_index" is found, swap both values. Then that list is sorted sub-list.
- Then, increment "min_index" to point to the next element in the unsorted sub-list.
- Repeat 5-7 until the list is sorted.
Simulator Procedure
- Enter the input values.
- Click on the Submit button.
- Select the variables from the dropdown list.
- Click on the Finish button or Start button to view the state diagram.
- If you have clicked on the Start button, then use the Next and Previous buttons to view the State diagram.
- Click on the Reset button when the State diagram is completed.