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
1. Which of the following is true regarding the graph of y = 1/x ?
KATRIN_1 [288]

Answer:

b. There are horizontal and vertical asymptotes

Step-by-step explanation:

The graph is a hyperbola with asymptotes of x=0 and y=0

7 0
3 years ago
13. Find the slope of the line that contains (3, 1) and (1, 1).
Mumz [18]

Answer:

slope would be zero

Step-by-step explanation:

It is not moving on the graph

Hope this helps!

5 0
3 years ago
What is the value of the expression 30 - 9+ 3 - (12 = 4)?
Flauer [41]

Answer:

21

Step-by-step explanation:

30 - 9 +3

30 - 12

18

18 - 12=4

      12/4 = -3

18 - -3

21

8 0
2 years ago
Can you answer the question please I really need help
LenaWriter [7]
The answer is 1 7/30 hope this helps
5 0
3 years ago
Find rhe volume of a cylinder with a diameter of 10 inches and a height of 20 inches
IrinaK [193]
Since the diameter of the cylinder is 10, its radius is half that, or 5, thus

\bf \textit{volume of a cylinder}\\\\&#10;V=\pi r^2 h~~&#10;\begin{cases}&#10;r=radius\\&#10;h=height\\&#10;-----\\&#10;r=5\\&#10;h=20&#10;\end{cases}\implies V=\pi (5)^2(20)
7 0
3 years ago
Other questions:
  • 10-8x&gt;26 does someone know the answer and solution Please need help with hw
    11·1 answer
  • Which of the following is a geometric series?
    15·1 answer
  • What is this question
    6·1 answer
  • A room is 8.5 m long,6.5 m broad and 3.4 m high. It has two doors, each measuring (2 m 1m).Find the cost of painting its four wa
    11·1 answer
  • HELP HURRYYYY If you spin the spinner below 150 times, which of the following outcomes are reasonable? Select all that apply. A)
    15·2 answers
  • Simplify the expresión 8(-4+-3p)
    9·1 answer
  • 6th grade math... anybody can help ?! :)
    12·1 answer
  • 394174837803 x 441870879=?
    8·2 answers
  • What is the criteria​
    15·1 answer
  • How many times can you split a number down until it is impossible to divide a number.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!