I have a randomly generated array of integers between 1 and 100, and the array's length is between 5 and 10. The array is sorted in ascending order.
I am trying to determine how I would calculate the median. Part of the criteria is to "declare the median as a double." My current work uses an If...Else loop to get the median, but the median is not declared. I realize I have to start over, but I am unsure where even to begin.