answersLogoWhite

0

Your best bet would probably be to iterate through the array using a for loop and compare each value to the current low and high values (which you would store in a local variable)

for example:

for each element in array

{

if current is less than lowest_value

lowest_value = current

else if current is greater than highest_value

highest_value = current

}

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

How to find max and min values?

Find the minimum and maximum of what? An array?


How do you find max value out of anonymous array in java?

java is very most important language in computer field. .net is also useful


How do you find the minimum value?

algebra


The minimum number of comparisons requied to find the second smallest element in a 1000 element array is?

1010


Write a c program to find the maximum value of 25 element in an array?

int findMax(int *array) { int max = array[0]; for(int i = 1; i < array.length(); i++) { if(array[i] > max) max = array[i] } return max; }


How do you write an assembly language program to find the sum of n numbers using array?

write an assembly language program to find sum of N numbers


How do you find minimum and maximum value of calculus?

In Calculus, to find the maximum and minimum value, you first take the derivative of the function then find the zeroes or the roots of it. Once you have the roots, you can just simply plug in the x value to the original function where y is the maximum or minimum value. To know if its a maximum or minimum value, simply do your number line to check. the x and y are now your max/min points/ coordinates.


What is the most efficient way to find the median of an unsorted array of numbers?

One efficient way to find the median of an unsorted array of numbers is to first sort the array in either ascending or descending order, then determine the middle value as the median.


How can we find Range in case of frequency distribution?

Range = Maximum value - Minimum value


How can you get position of number from given some number by using array in c language?

Traverse the array from index 0 until you find the number. Return the index of that number.


What is the most efficient way to find the maximum value in a sliding window of a given array?

One efficient way to find the maximum value in a sliding window of a given array is to use a data structure like a deque (double-ended queue) to store the indices of elements in the window. By iterating through the array and maintaining the maximum value within the window, you can update the deque to ensure that it only contains relevant indices. This approach allows you to find the maximum value in the sliding window with a time complexity of O(n), where n is the number of elements in the array.


How do you Find the highest (maximum) and lowest (minimum) grades in an array?

You can get many example of"c programming" Reference:cprogramming-bd.com/c_page1.aspx# integer grades