answersLogoWhite

0


Best Answer

Find the minimum and maximum of what? An array?

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How to find max and min values?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the difference between min and max function?

The MIN function returns the lowest value from a set of values. The MAX function returns the highest value from a set of values.=MIN(A2:A20)=MAX(A2:A20)The MIN function returns the lowest value from a set of values. The MAX function returns the highest value from a set of values.=MIN(A2:A20)=MAX(A2:A20)The MIN function returns the lowest value from a set of values. The MAX function returns the highest value from a set of values.=MIN(A2:A20)=MAX(A2:A20)The MIN function returns the lowest value from a set of values. The MAX function returns the highest value from a set of values.=MIN(A2:A20)=MAX(A2:A20)The MIN function returns the lowest value from a set of values. The MAX function returns the highest value from a set of values.=MIN(A2:A20)=MAX(A2:A20)The MIN function returns the lowest value from a set of values. The MAX function returns the highest value from a set of values.=MIN(A2:A20)=MAX(A2:A20)The MIN function returns the lowest value from a set of values. The MAX function returns the highest value from a set of values.=MIN(A2:A20)=MAX(A2:A20)The MIN function returns the lowest value from a set of values. The MAX function returns the highest value from a set of values.=MIN(A2:A20)=MAX(A2:A20)The MIN function returns the lowest value from a set of values. The MAX function returns the highest value from a set of values.=MIN(A2:A20)=MAX(A2:A20)The MIN function returns the lowest value from a set of values. The MAX function returns the highest value from a set of values.=MIN(A2:A20)=MAX(A2:A20)The MIN function returns the lowest value from a set of values. The MAX function returns the highest value from a set of values.=MIN(A2:A20)=MAX(A2:A20)


Trace out the algorithm Max Min on a data set containing atleast 8 elements?

Steps to perform MaxMin on a data set (2,4,6,3,8,1,9,7) are:(2,4,6,3) (8,1,9,7)((2,4)(6,3)) ((8,1)(9,7))In sublist (4,6), max is 6 and min is 4. In sublist (8,9), max is 9 and min is 8.Comparing max and min values of sublist (2,4) and sublist (6,3), value of max is 6 and min is 2.Therefore, for sublist (2,4,6,3) max is 6 and min is 2.Similarly, comparing max and min values of sublist (8,1) and sublist (9,7), value of max is 9 and min is 1.Therefore, for sublist (8,1,9,7) max is 9 and min is 1.Finally, comparing max and min values of sublist (2,4,6,3) and sublist (8,1,9,7), value of max is 9 and min is 1. Steps to perform MaxMin on a data set (2,4,6,3,8,1,9,7) are:(2,4,6,3) (8,1,9,7)((2,4)(6,3)) ((8,1)(9,7))In sublist (4,6), max is 6 and min is 4. In sublist (8,9), max is 9 and min is 8.Comparing max and min values of sublist (2,4) and sublist (6,3), value of max is 6 and min is 2.Therefore, for sublist (2,4,6,3) max is 6 and min is 2.Similarly, comparing max and min values of sublist (8,1) and sublist (9,7), value of max is 9 and min is 1.Therefore, for sublist (8,1,9,7) max is 9 and min is 1.Finally, comparing max and min values of sublist (2,4,6,3) and sublist (8,1,9,7), value of max is 9 and min is 1. Steps to perform MaxMin on a data set (2,4,6,3,8,1,9,7) are:(2,4,6,3) (8,1,9,7)((2,4)(6,3)) ((8,1)(9,7))In sublist (4,6), max is 6 and min is 4. In sublist (8,9), max is 9 and min is 8.Comparing max and min values of sublist (2,4) and sublist (6,3), value of max is 6 and min is 2.Therefore, for sublist (2,4,6,3) max is 6 and min is 2.Similarly, comparing max and min values of sublist (8,1) and sublist (9,7), value of max is 9 and min is 1.Therefore, for sublist (8,1,9,7) max is 9 and min is 1.Finally, comparing max and min values of sublist (2,4,6,3) and sublist (8,1,9,7), value of max is 9 and min is 1. sonika aggarwal GNIIT


How do you find the largest and the smallest values among 4 numbers using conditional operators?

int a, b, c, d, max, min; scanf("%d%d%d%d",&a, &b, &c, &d); (a>b)?(max=a,min=b):(max=b,min=a); (c>d)?(a=c,b=d):(a=d,b=c); max=(a>max)?a:max; min=(b<min)?b:min; printf("%d %d\n", max, min);


How do you find sum of sin series?

You take the integral of the sin function, -cos, and plug in the highest and lowest values. Then subtract the latter from the former. so if "min" is the low end of the series, and "max" is the high end of the series, the answer is -cos(max) - (-cos(min)), or cos(min) - cos(max).


What is Excel formula for range?

If you mean to find the difference between the highest and lowest number in a set, then you could use the MAX and MIN forumulas to find the two values and take the lowest from the highest. So if your values were in cells A2 to A20 then the formula would be: =MAX(A2:A20)-MIN(A2:A20) Your welcome


What do the Max and Min functions do?

The MAX function gets the highest value in a range and the MIN function gets the lowest. If there were values in all the cells from A2 to A20, you could use the two functions to get the highest and lowest values in the range:=MAX(A2:A20)=MIN(A2:A20)


How do you graph function g?

use y = g(x) make a table of y values for several x values Find max/min values using derivative. graph the ordered pairs.


What values can be obtained from min max thermometer?

The minimum, maximum, and current temperature.


Write a c program to find the sum of numbers between given limits?

int sum (int min, int max) {return (max-min+1)*(max+min)/2;}


How do you get the middle value of 3 integers in Dev C plus plus?

Use the median-of-three algorithm: int min (int a, int b) { return a<b?a:b; } int max (int a, int b) { return a<b?b:a; } int median_of_three (int a, int b, int c) { return max (min (a, b), min (max (a, b), c)); } Note that the algorithm does not cater for equal values which creates a problem when any two values are equal, because there are only two values to play with, neither of which can be regarded as being the middle value. If the equal value is the lower of the two values, the largest value is returned if and only if it is the last of the three values, otherwise the lowest value is returned. But when the equal value is the larger of the two values, the largest value is always returned. Lowest value is equal: Input: 0, 0, 1 = max (min (0, 0), min (max (0, 0), 1)) = max (0, min (0, 1)) = max (0, 1) = 1 Input: 0, 1, 0 = max (min (0, 1), min (max (0, 1), 0)) = max (0, min (1, 0)) = max (0, 0) = 0 Input: 1, 0, 0 = max (min (1, 0), min (max (1, 0), 0)) = max (0, min (1, 0)) = max (0, 0) = 0 Highest value is equal: Input: 0, 1, 1 = max (min (0, 1), min (max (0, 1), 1)) = max (0, min (1, 1)) = max (0, 1) = 1 Input: 1, 0, 1 = max (min (1, 0), min (max (1, 0), 1)) = max (0, min (1, 1)) = max (0, 1) = 1 Input: 1, 1, 0 = max (min (1, 1), min (max (1, 1), 0)) = max (1, min (1, 0)) = max (1, 0) = 1 The only way to resolve this problem and produce a consistent result is to sum all three inputs then subtract the minimum and maximum values: int median_of_three (int a, int b, int c) { return a + b + c - min (min (a, b), c) - max (max (a, b), c)); } Lowest value is equal: Input: 0, 0, 1 = 0 + 0 + 1 - min (min (0, 0), 1) - max (max (0, 0), 1) = 1 - 0 - 1 = 0 Input: 0, 1, 0 = 0 + 1 + 0 - min (min (0, 1), 0) - max (max (0, 1), 0) = 1 - 0 - 1 = 0 Input: 1, 0, 0 = 1 + 0 + 0 - min (min (1, 0), 0) - max (max (1, 0), 0) = 1 - 0 - 1 = 0 Highest value is equal: Input: 0, 1, 1 = 0 + 1 + 1 - min (min (0, 1), 1) - max (max (0, 1), 1) = 2 - 0 - 1 = 1 Input: 1, 0, 1 = 1 + 0 + 1 - min (min (1, 0), 1) - max (max (1, 0), 1) = 2 - 0 - 1 = 1 Input: 1, 1, 0 = 1 + 1 + 0 - min (min (1, 1), 0) - max (max (1, 1), 0) = 2 - 0 - 1 = 1 This makes sense because when we sort 0, 0, 1 in ascending order, 0 is in the middle, while 0, 1, 1 puts 1 in the middle.


Write the pseudocode for finding the largest of three numbers?

max=number min=number counter=1 start while(counter<=3) read number start if max<number max=number else if min>number min=number end while write max write min /*modify the counter switch according to the number of values being compared if required*/


What is the meaning of maximum and minimum in Excel?

Maximum is the highest value from a set and minimum is the lowest number from a set. If you had a list of numbers in the cells from A2 to A20, you could find the highest and lowest values using the MAX and MIN functions as follows: =MAX(A2:A20) =MIN(A2:A20)