This is a figure.
Usage: Enter a key as a number. Click the Next button to perform one comparison. Click the Reset button to start over with a new random list of the specified size (min 3 and max 20). The Custom Input button enables you to enter a custom list.
87
33
2
65
24
A new random list is created
  1    int linearSearch(const int list[], int key, int arraySize) 
  2    {
  3      for (int i = 0; i < arraySize; i++) 
  4      {
  5        if (key == list[i])
  6          return i;
  7      }
  8      return -1;
  9    }