1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
vesna_86 [32]
4 years ago
9

Describe an algorithm that produces the maximum, me- dian, mean, and minimum of a set of three integers. (The median of a set of

integers is the middle element in the list when these integers are listed in order of increasing size. The mean of a set of integers is the sum of the integers divided by the number of integers in the set.)
Mathematics
1 answer:
zheka24 [161]4 years ago
5 0

Answer

The mean of three numbers x1,x2,x3 can be obtained by a calculus. The first step of the algorithm is

1) mean(x1,x2,x3) = \frac{x1+x2+x3}{3}

In order to obtain the median, maximun and minumun of x1, x2 and x3, we can compare x1 and x2. The smaller of those numbers will be compared to x3 and, if x3 is even smaller, then x3 is the minimun, the other small number is the median, and the remaining number is the maximun. Otherwise, we compare x3 with the bigger number to find median and maximun. To summarize:

2) compare x1 with x2. The bigger of the two numbers will be called '<em>s</em>' (for  small) and the smaller will be called '<em>b</em>' (from big).

3) compare x3 with <em>s</em>. The smaller of this subset will be the minimun of the entire set of 3 elements.

4) Check if x3 is the minimun, in that case, <em>s </em>is the median, because <em>s</em> is between x3 and <em>b. </em>We also conclude that <em>b</em> is the maximun

5) if x3 in not the minimun, then compare it with <em>b.</em> The bigger element between the two of them will be the maximun of the set, and the smaller one will be the median.

I hope it helps you!

You might be interested in
BRAINLIEST BRAINLIEST!!!! Easy mathhh
Arte-miy333 [17]

Answer:

sorry if image isn't clear, tried many shots

Step-by-step explanation:

7 0
3 years ago
Read 2 more answers
Twelve friends came to Guy’s birthday party. He received seven gifts and a total of $95 in cash for his birthday. He buys an air
V125BC [204]
$95-$9 = $86 / $8 = 10 animal shelters with a remainder of $6

I hope this helps! :)
4 0
3 years ago
Read 2 more answers
HELP!!!
lesya [120]

Answer:

its D

Step-by-step explanation:

basically all you have to do if cut off the semicircles fins their areas then find the rectangles area and add them all up

6 0
3 years ago
Which subtraction expression does the number line model show ​
loris [4]

Answer:

13-+4

Step-by-step explanation:

3 0
3 years ago
If p is a positive integer, which could be an odd integer?
sdas [7]
p > 0 \Rightarrow

2p+2 (even)

p^3-p (odd or even)

p^2 + p (even)

p^2 - p (even)

7p - 3 (ODD); 7p odd, 7p-3 = (odd)-(odd)=(odd)
3 0
3 years ago
Read 2 more answers
Other questions:
  • What is the length of MN?<br> 58 cm<br> 75 cm<br> 88 cm<br> 116 cm
    5·1 answer
  • Which of the following graphs is the same as y = log1/2x? x = 2y x = 2-y x = -(2y)
    15·1 answer
  • Evaluate: |-18|+|-15|+|-8|
    10·2 answers
  • Tell whether the sequence is arithmetic if it is identify the common difference -9,-17,-26,-33
    12·2 answers
  • Kevin went on a 15 3/5 mile hike. He stopped for a water break every 2 1/4 miles. How many times did Kevin stop for water?
    12·1 answer
  • Help pls. need this question answered asap
    10·1 answer
  • Abby spent 5/8 of her money and saved the rest. If she spent $45 how much money did she have at first?
    10·1 answer
  • Solve for xxx in each of the figures below and mark the correct value.
    6·1 answer
  • Helpp me with this problem
    6·1 answer
  • If f(x)=5x^2-3x-1f(x)=5x 2 −3x−1, then what is the remainder when f(x)f(x) is divided by x+10x+10?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!