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]
3 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]3 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
. An object dropped from a height of 200 meters has a height, h(t), in meters after t seconds have lapsed, such that h(t) = 200
Veronika [31]

Answer:

t(h)= (h-200)/-4.9

The time to reach a height of 50 meters is 30.6 seconds

Step-by-step explanation:

To express t as a function of height (h) we must transform the equation below:

h=200-4.9t

h-200=-4.9t

(h-200)/-4.9=t

t(h)= (h-200)/-4.9

To find the time to reach a height of 50 meters, we must replace this value on the new equation:

t(h)=50-200/-4.9

t(h)= 30.612

The time to reach a height of 50 meters is 30.6 seconds

8 0
3 years ago
Lindo used 1/4 of the yard of fabric she bought for a sewing project how much fabric did she have left
maksim [4K]

Answer:

she has 3/4 of the material left or 75%

7 0
2 years ago
Can someone solve -5x +2y=10
marta [7]

Answer:

x=\frac{2}{5}y-2

Step-by-step explanation:

-5x+2y=10\\-5x+2y-2y=10-2y\\-5x=2y-10\\\frac{-5x}{-5}=\frac{2y-10}{5}\\ x=\frac{2}{5}y-2

6 0
3 years ago
Read 2 more answers
What is the sequence technique of this number sequence 3 20 78 334 1696 ?
polet [3.4K]
3×2+14=20
20×3+18=78
78×4+22=334
334×5+26=1696
1696×6+30=10206
Hence, the question mark should be replaced by 10206
3 0
3 years ago
Which equation represents the line that passes through (–8, 11) and (4,7/2 )? A. y =-5/8x + 6 B. y =-5/8 x + 16 C. y = -15/2x –
Dafna11 [192]
Which equation represents the line that passes through (–8, 11) and (4,7/2 )?
☆☆☆☆☆☆☆☆☆☆☆☆☆☆A. y =-5/8x + 6
B.y =-5/8 x + 16
C. y = -15/2x – 49
D. y =-15/2 x + 71

4 0
3 years ago
Other questions:
  • Help! And plz do explain...
    12·1 answer
  • An airplane travels at an average speed of 250 mph for 3 hours.
    5·2 answers
  • Please rezolve this, thank you in advance
    15·2 answers
  • How do I do this? like how ?????
    6·1 answer
  • How do you find the interquartile range
    6·1 answer
  • Write an equation parallel to the function y=-3x+1 and goes through the point (1, -7)
    7·1 answer
  • What point located in quadrant l has an x-value that is 5 units from the origin and a yevalue that is 4 units from the origin?
    6·1 answer
  • How many litres of water can the cylinder hold??​
    15·1 answer
  • A cylindrical container that contains three tennis balls that are 2. 7 inches in diameter is lying on its side and passes throug
    13·1 answer
  • A plane flies 100km north and then flies 400km south, what is its new position?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!